diff --git a/src/prometheus_alert_rules/ipmi_sensors.yaml b/src/prometheus_alert_rules/ipmi_sensors.yaml index d00731b4..6052bf3c 100644 --- a/src/prometheus_alert_rules/ipmi_sensors.yaml +++ b/src/prometheus_alert_rules/ipmi_sensors.yaml @@ -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 }}" diff --git a/tests/unit/test_alert_rules/test_ipmi_sensors.yaml b/tests/unit/test_alert_rules/test_ipmi_sensors.yaml index fd882a23..84611240 100644 --- a/tests/unit/test_alert_rules/test_ipmi_sensors.yaml +++ b/tests/unit/test_alert_rules/test_ipmi_sensors.yaml @@ -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