From 39e8015395305ab447774a1bec1a24f514e53484 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 8 Mar 2021 15:16:46 +0000 Subject: [PATCH 1/1] Add alert for IPMI power sensors --- cookbooks/prometheus/templates/default/alert_rules.yml.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 0e834474c..fd25f2523 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -82,6 +82,11 @@ groups: alertgroup: "{{ $labels.instance }}" annotations: voltage_volts: "{{ with printf \"ipmi_voltage_volts{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}V{{end}}" + - alert: ipmi power alarm + expr: ipmi_power_state > 0 or ipmi_sensor_state{type=~"Power .*"} > 0 + for: 5m + labels: + alertgroup: "{{ $labels.instance }}" - name: mdadm rules: - alert: mdadm array inactive -- 2.39.5