From 12e55b9a956bcbed90ce4f925ef56e9e1812eda0 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 19 Jul 2022 00:47:00 +0100 Subject: [PATCH 1/1] Add an alert for unusually low apache request rates --- cookbooks/prometheus/templates/default/alert_rules.yml.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index b928520ed..4b5a0c60f 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -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 -- 2.39.5