diff --git a/src/prometheus_alert_rules/general.yaml b/src/prometheus_alert_rules/general.yaml index 2b0ac09a..5d3eab1b 100644 --- a/src/prometheus_alert_rules/general.yaml +++ b/src/prometheus_alert_rules/general.yaml @@ -3,7 +3,7 @@ groups: rules: - alert: CollectorFailed expr: '{__name__=~"(.*)_collector_failed"} == 1' - for: 0m + for: 1m labels: severity: error annotations: diff --git a/tests/unit/test_alert_rules/test_general.yaml b/tests/unit/test_alert_rules/test_general.yaml index fe74bd19..d1fd828f 100644 --- a/tests/unit/test_alert_rules/test_general.yaml +++ b/tests/unit/test_alert_rules/test_general.yaml @@ -1,10 +1,10 @@ rule_files: - ../../../src/prometheus_alert_rules/general.yaml -evaluation_interval: 1m +evaluation_interval: 2m tests: - - interval: 1m + - interval: 2m input_series: - series: ipmidcmi_collector_failed{instance="ubuntu-99", collector="ipmidcmi"} values: '1x15' @@ -12,7 +12,7 @@ tests: values: '1x15' alert_rule_test: - - eval_time: 0m + - eval_time: 2m alertname: CollectorFailed exp_alerts: - exp_labels: