]> git.openstreetmap.org Git - chef.git/commitdiff
Add a packet loss alert
authorTom Hughes <tom@compton.nu>
Wed, 8 Mar 2023 20:28:06 +0000 (20:28 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 8 Mar 2023 20:28:06 +0000 (20:28 +0000)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index 239731607087fb5c1dc9d6854797c0460be9e0ba..b0094a83b24869ba8e5555751b45e5f1418135c3 100644 (file)
@@ -584,6 +584,15 @@ groups:
           alertgroup: "{{ $labels.instance }}"
         annotations:
           percentage_used: "{{ $value | humanizePercentage }}"
+  - name: smokeping
+    rules:
+      - alert: packet loss
+        expr: 100 - (rate(smokeping_response_duration_seconds_count[5m]) * 100 / rate(smokeping_requests_total[5m])) > 0
+        for: 5m
+        labels:
+          alertgroup: smokeping
+        annotations:
+          loss_rate: "{{ $value | humanizePercentage }}"
   - name: snmp
     rules:
       - alert: snmp pdus missing