From: Tom Hughes Date: Sat, 31 Dec 2022 12:02:00 +0000 (+0000) Subject: Add some mysql alerts X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/586d197702be461402f6837edf1ef6c612c1f0a7 Add some mysql alerts --- diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 34a33d374..6c8078e45 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -337,6 +337,20 @@ groups: alertgroup: "{{ $labels.instance }}" annotations: new_oom_kills: "{{ $value }}" + - name: mysql + rules: + - alert: mysql down + expr: mysql_up == 0 + for: 1m + labels: + alertgroup: "{{ $labels.instance }}" + - alert: mysql connection limit + expr: mysql_global_status_max_used_connections / mysql_global_variables_max_connections > 0.8 + for: 1m + labels: + alertgroup: "{{ $labels.instance }}" + annotations: + connections_used: "{{ $value | humanizePercentage }}" - name: network rules: - alert: interface transmit rate