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

fix(alert): Ignore IPMI slot connector alerts. #111

Merged
merged 3 commits into from
Nov 21, 2023
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
8 changes: 5 additions & 3 deletions src/prometheus_alert_rules/ipmi_sensors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,16 @@ groups:
FAN_SPEED_RPM = {{ $value }}
LABELS = {{ $labels }}

# Entity Presence sensors are ignored since the state doesn't correspond to a real alert
# Slot Connector sensors are ignored since they raise a high number of false positive alerts
- alert: IPMISensorStateNotOk
expr: ipmi_generic_sensor_value{state=~"Warning|Critical", type!="Entity Presence"}
expr: ipmi_generic_sensor_value{state=~"Warning|Critical", type!~"Entity\\sPresence|Slot/Connector"}
Pjack marked this conversation as resolved.
Show resolved Hide resolved
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 }}
6 changes: 4 additions & 2 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 All @@ -228,7 +230,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.
dashmage marked this conversation as resolved.
Show resolved Hide resolved
VALUE = 20
LABELS = map[__name__:ipmi_generic_sensor_value instance:ubuntu-11 state:Warning]
- exp_labels:
Expand All @@ -238,6 +240,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]