]> git.openstreetmap.org Git - chef.git/commitdiff
Ignore 509 bandwidth limit errors when computing error rates
authorTom Hughes <tom@compton.nu>
Thu, 18 Nov 2021 08:48:23 +0000 (08:48 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 18 Nov 2021 08:48:23 +0000 (08:48 +0000)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index 346a613772574c55a7826294d0045a2b055b1625..c0f5e0c7758c7a7acb5a4c1e631c7e268fd0d315 100644 (file)
@@ -356,7 +356,7 @@ groups:
   - name: web
     rules:
       - alert: web error rate
-        expr: sum(rate(api_call_count_total{status=~"5.*"}[5m])) by (instance) / sum(rate(api_call_count_total[5m])) by (instance) > 0.002
+        expr: sum(rate(api_call_count_total{status=~"50[0-8]|5[1-9][0-9]"}[5m])) by (instance) / sum(rate(api_call_count_total[5m])) by (instance) > 0.002
         for: 5m
         labels:
           alertgroup: web