]> git.openstreetmap.org Git - chef.git/commitdiff
Add an alert for prometheus configuration errors
authorTom Hughes <tom@compton.nu>
Mon, 25 Jul 2022 12:30:47 +0000 (13:30 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 25 Jul 2022 12:30:47 +0000 (13:30 +0100)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index 61a7370b1289595afe098b8a721030e785e660e8..30a14a471262afc886129a99075e15500452d144 100644 (file)
@@ -1,13 +1,6 @@
 # DO NOT EDIT - This file is being maintained by Chef
 
 groups:
-  - name: alertmanager
-    rules:
-      - alert: prometheus target missing
-        expr: up == 0
-        for: 10m
-        labels:
-          alertgroup: "prometheus"
   - name: amsterdam
     rules:
       - alert: pdu current draw
@@ -422,6 +415,18 @@ groups:
           alertgroup: "{{ $labels.instance }}"
         annotations:
           queries: "{{ $value }}"
+  - name: prometheus
+    rules:
+      - alert: prometheus configuration error
+        expr: prometheus_config_last_reload_successful == 0
+        for: 10m
+        labels:
+          alertgroup: "prometheus"
+      - alert: prometheus target missing
+        expr: up == 0
+        for: 10m
+        labels:
+          alertgroup: "prometheus"
   - name: raid
     rules:
       - alert: raid array degraded