]> git.openstreetmap.org Git - chef.git/commitdiff
Make fastly healthcheck alerts operate on a per-service basis
authorTom Hughes <tom@compton.nu>
Mon, 21 Nov 2022 21:00:45 +0000 (21:00 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 21 Nov 2022 21:01:09 +0000 (21:01 +0000)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index 9522dbf6ba1b8eefdc11306c8417b2748f96bf57..8c1aeee48bea93bfc9ec168c698b0ac45babdbb5 100644 (file)
@@ -145,12 +145,12 @@ groups:
         annotations:
           error_rate: "{{ $value | humanizePercentage }}"
       - alert: fastly healthcheck failing
-        expr: count(fastly_healthcheck_status == 0) > 0
+        expr: count(fastly_healthcheck_status == 0) by (service) > 0
         for: 15m
         labels:
           alertgroup: fastly
       - alert: multiple fastly healthchecks failing
-        expr: count(fastly_healthcheck_status == 0) > 4
+        expr: count(fastly_healthcheck_status == 0) by (service) > 4
         for: 5m
         labels:
           alertgroup: fastly