]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/prometheus/templates/default/alert_rules.yml.erb
Add an alert for mysql connection errors
[chef.git] / cookbooks / prometheus / templates / default / alert_rules.yml.erb
index 1fac68869072fa423a1f2c1e9e8affdb42a00976..632fddc9f1baf15cea5c6c12f8d29d2a57aff1a7 100644 (file)
@@ -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