From: Tom Hughes Date: Thu, 7 Sep 2023 16:20:44 +0000 (+0100) Subject: Add a connection limit alert for apache X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/9efef35f6b4ac2ccdd62a6deb57019a6ba14ce7e?hp=7c2fc54e91ca3809d13cb9fa4b3b1cf8155d6d75 Add a connection limit alert for apache --- diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 77400969e..956c0d5b3 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 connection limit + expr: (apache_connections{state="total"} - on (instance) apache_connections{state="closing"}) / on (instance) (apache_server_limit * on (instance) (apache_threads_per_child + on (instance) (apache_async_request_worker_factor * on (instance) apache_workers{state="idle"} / on(instance) apache_processes{state="all"}))) > 0.8 + for: 5m + labels: + alertgroup: "{{ $labels.instance }}" + annotations: + connections: "{{ $value | humanizePercentage }}" - name: chef rules: - alert: chef client not running