]> git.openstreetmap.org Git - chef.git/commitdiff
Alert if the number of SNMP PDUs returned decreases
authorTom Hughes <tom@compton.nu>
Sat, 31 Dec 2022 15:41:07 +0000 (15:41 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 31 Dec 2022 15:41:07 +0000 (15:41 +0000)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index 6c8078e45e1310905342029197e303d2c2ac7073..24a7a725f0bdfdfc3a47d2316d036f060ef77409 100644 (file)
@@ -570,6 +570,15 @@ groups:
           alertgroup: "{{ $labels.instance }}"
         annotations:
           percentage_used: "{{ $value | humanizePercentage }}"
+  - name: snmp
+    rules:
+      - alert: snmp pdus missing
+        expr: max_over_time(snmp_scrape_pdus_returned[1d]) - snmp_scrape_pdus_returned > 0
+        for: 15m
+        labels:
+          alertgroup: snmp
+        annotations:
+          missing_pdus: "{{ $value }}"
   - name: ssl
     rules:
       - alert: ssl certificate probe failed