]> git.openstreetmap.org Git - chef.git/commitdiff
Add alert for IPMI power sensors
authorTom Hughes <tom@compton.nu>
Mon, 8 Mar 2021 15:16:46 +0000 (15:16 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 8 Mar 2021 15:16:46 +0000 (15:16 +0000)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index 0e834474c692123c1bb80f7a02c23f6754b9c99d..fd25f2523498188e9c0e0238805ab551d06e40ce 100644 (file)
@@ -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}}"
           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
   - name: mdadm
     rules:
       - alert: mdadm array inactive