From 8724d4f9c9bf439e5dc28a05f04c1a80ca7498c4 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 18 Nov 2021 08:48:23 +0000 Subject: [PATCH] Ignore 509 bandwidth limit errors when computing error rates --- cookbooks/prometheus/templates/default/alert_rules.yml.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 346a61377..c0f5e0c77 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -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 -- 2.39.5