]> git.openstreetmap.org Git - chef.git/commitdiff
Add alerts for juniper alarms
authorTom Hughes <tom@compton.nu>
Fri, 4 Aug 2023 21:57:56 +0000 (22:57 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 4 Aug 2023 21:57:56 +0000 (22:57 +0100)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index 2678f5e1a26aa4ceb2832bdcde1b837b6ffb0fbf..d717e4f0aeedacf3f5c8fc628485c9b945eedc05 100644 (file)
@@ -272,6 +272,20 @@ groups:
           alertgroup: "{{ $labels.instance }}"
   - name: juniper
     rules:
+      - alert: juniper red alarms
+        expr: juniper_alarms_red_count > 0
+        for: 5m
+        labels:
+          alertgroup: "{{ $labels.site }}"
+        annotations:
+          alarm_count: "{{ $value }} alarms"
+      - alert: juniper yellow alarms
+        expr: juniper_alarms_yellow_count > 0
+        for: 5m
+        labels:
+          alertgroup: "{{ $labels.site }}"
+        annotations:
+          alarm_count: "{{ $value }} alarms"
       - alert: juniper cpu alarm
         expr: junos_route_engine_load_average_five / 2 > 0.5
         for: 5m