Skip to content

Commit

Permalink
Merge branch 'main' into SOLENG-946
Browse files Browse the repository at this point in the history
  • Loading branch information
Deezzir authored Dec 14, 2024
2 parents 10f2583 + 3caaea7 commit 593d164
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
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

0 comments on commit 593d164

Please sign in to comment.