Skip to content

Commit

Permalink
fix(alert): Ignore IPMI slot connector alerts.
Browse files Browse the repository at this point in the history
Fixes: #107
  • Loading branch information
dashmage committed Nov 17, 2023
1 parent f084905 commit 904377a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/prometheus_alert_rules/ipmi_sensors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ groups:
LABELS = {{ $labels }}
- alert: IPMISensorStateNotOk
expr: ipmi_generic_sensor_value{state=~"Warning|Critical", type!="Entity Presence"}
expr: ipmi_generic_sensor_value{state=~"Warning|Critical", type!="Entity Presence", type!="Slot/Connector"}
for: 0m
labels:
labels:
severity: "{{ toLower $labels.state }}"
annotations:
summary: IPMI sensor value in {{ toLower $labels.state }} state. (instance {{ $labels.instance }})
description: |
A sensor value, recorded by ipmi sensor, in {{ toLower $labels.state }} state. Entity Presence sensors are ignored.
A sensor value, recorded by ipmi sensor, in {{ toLower $labels.state }} state. Entity Presence and Slot Connector sensors are ignored.
VALUE = {{ $value }}
LABELS = {{ $labels }}
4 changes: 2 additions & 2 deletions tests/unit/test_alert_rules/test_ipmi_sensors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ tests:
exp_annotations:
summary: IPMI sensor value in warning state. (instance ubuntu-11)
description: |
A sensor value, recorded by ipmi sensor, in warning state. Entity Presence sensors are ignored.
A sensor value, recorded by ipmi sensor, in warning state. Entity Presence and Slot Connector sensors are ignored.
VALUE = 20
LABELS = map[__name__:ipmi_generic_sensor_value instance:ubuntu-11 state:Warning]
- exp_labels:
Expand All @@ -238,6 +238,6 @@ tests:
exp_annotations:
summary: IPMI sensor value in critical state. (instance ubuntu-12)
description: |
A sensor value, recorded by ipmi sensor, in critical state. Entity Presence sensors are ignored.
A sensor value, recorded by ipmi sensor, in critical state. Entity Presence and Slot Connector sensors are ignored.
VALUE = 50
LABELS = map[__name__:ipmi_generic_sensor_value instance:ubuntu-12 state:Critical]

0 comments on commit 904377a

Please sign in to comment.