From: Tom Hughes Date: Mon, 11 Mar 2024 08:40:10 +0000 (+0000) Subject: Add an alert for mysql connection errors X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/21bdf50266fe3d3be9e16e5a280adb5b9094699b?ds=inline Add an alert for mysql connection errors --- diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 1fac68869..632fddc9f 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -421,6 +421,13 @@ groups: alertgroup: "{{ $labels.instance }}" annotations: connections_used: "{{ $value | humanizePercentage }}" + - alert: mysql connection errors + expr: increase(mysql_global_status_connection_errors_total[1m]) > 0 + for: 0m + labels: + alertgroup: "{{ $labels.instance }}" + annotations: + error_count: "{{ $value }}" - name: network rules: - alert: interface redundancy lost