]> git.openstreetmap.org Git - chef.git/commitdiff
Improve fastly alerts to make them more useful
authorTom Hughes <tom@compton.nu>
Mon, 10 Jul 2023 13:20:15 +0000 (14:20 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 10 Jul 2023 13:20:49 +0000 (14:20 +0100)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index 396de8de43001ed12dbce7aeca8a26f1fc55b0df..899c765e45efa858401f84355115bc3ed54b9166 100644 (file)
@@ -160,13 +160,23 @@ groups:
           alertgroup: fastly
         annotations:
           error_rate: "{{ $value | humanizePercentage }}"
-      - alert: fastly healthcheck failing
-        expr: count(fastly_healthcheck_status == 0) by (service) > 0
+      - alert: fastly frontend healthcheck warning
+        expr: count(fastly_healthcheck_status == 0) by (service, datacenter) > 2
         for: 15m
         labels:
           alertgroup: fastly
-      - alert: multiple fastly healthchecks failing
-        expr: count(fastly_healthcheck_status == 0) by (service) > 4
+      - alert: fastly frontend healthcheck critical
+        expr: count(fastly_healthcheck_status == 0) by (service, datacenter) == count(fastly_healthcheck_status) by (service, datacenter)
+        for: 5m
+        labels:
+          alertgroup: fastly
+      - alert: fastly backend healthcheck warning
+        expr: count(fastly_healthcheck_status == 0) by (service, backend) > 10
+        for: 15m
+        labels:
+          alertgroup: fastly
+      - alert: fastly backend healthcheck critical
+        expr: count(fastly_healthcheck_status == 0) by (service, backend) == count(fastly_healthcheck_status) by (service, backend)
         for: 5m
         labels:
           alertgroup: fastly