Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fire SsaCLIControllerNotOK if status is "NOT CONFIGURED" #376

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/prometheus_alert_rules/ssacli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ groups:
LABELS = {{ $labels }}

- alert: SsaCLIControllerNotOK
expr: ssacli_controller_info{status != "OK", status!="NOT CONFIGURED"} == 1
expr: ssacli_controller_info{status!~"^(OK|NOT CONFIGURED)$"} == 1
for: 0m
labels:
severity: critical
Expand Down
13 changes: 13 additions & 0 deletions tests/unit/test_alert_rules/test_ssacli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ tests:
LABELS = map[__name__:ssacli_controller_info instance:ubuntu-2 part:Cache Status status:DOWN]


- interval: 1m
input_series:
- series: 'ssacli_controller_info{instance="ubuntu-2", part="Cache Status", status="NOT CONFIGURED"}'
values: '1x15'
- series: 'ssacli_controller_info{instance="ubuntu-3", part="Cache Status", status="OK"}'
values: '1x15'
alert_rule_test:
- eval_time: 0m
alertname: SsaCLIControllerNotOK
# Expect no alerts when status is NOT CONFIGURED or OK
exp_alerts: []


- interval: 1m
input_series:
- series: 'ssacli_command_success{instance="ubuntu-3"}'
Expand Down
Loading