Skip to content

Commit

Permalink
Add input series for slot connector in tests.
Browse files Browse the repository at this point in the history
Also reduce alert expr by removing duplicate type.
  • Loading branch information
dashmage committed Nov 18, 2023
1 parent 904377a commit 138ab17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/prometheus_alert_rules/ipmi_sensors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ groups:
LABELS = {{ $labels }}
- alert: IPMISensorStateNotOk
expr: ipmi_generic_sensor_value{state=~"Warning|Critical", type!="Entity Presence", type!="Slot/Connector"}
expr: ipmi_generic_sensor_value{state=~"Warning|Critical", type!~"Entity\\sPresence|Slot/Connector"}
for: 0m
labels:
severity: "{{ toLower $labels.state }}"
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_alert_rules/test_ipmi_sensors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ tests:
values: '50x15'
- series: ipmi_generic_sensor_value{state="Critical", instance="ubuntu-12", type="Entity Presence"}
values: '50x15'
- series: ipmi_generic_sensor_value{state="Critical", instance="ubuntu-12", type="Slot/Connector"}
values: '50x15'

alert_rule_test:
- eval_time: 0m
Expand Down

0 comments on commit 138ab17

Please sign in to comment.