]> git.openstreetmap.org Git - chef.git/commitdiff
Add an alert for unusually low apache request rates
authorTom Hughes <tom@compton.nu>
Mon, 18 Jul 2022 23:47:00 +0000 (00:47 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 18 Jul 2022 23:47:00 +0000 (00:47 +0100)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index b928520ed2756af7c741e5f8c446e0874e63e47c..4b5a0c60f2e14517c5d8b681001d01e382aa2d57 100644 (file)
@@ -52,6 +52,13 @@ groups:
           alertgroup: "{{ $labels.instance }}"
         annotations:
           busy_workers: "{{ $value | humanizePercentage }}"
+      - alert: apache low request rate
+        expr: rate(apache_accesses_total[$__rate_interval]) / rate(apache_accesses_total[$__rate_interval] offset 1w) < 0.25 and rate(apache_accesses_total[1h] offset 1w) > 2
+        for: 15m
+        labels:
+          alertgroup: "{{ $labels.instance }}"
+        annotations:
+          request_rate: "{{ $value | humanizePercentage }}"
   - name: chef
     rules:
       - alert: chef client not running