]> git.openstreetmap.org Git - chef.git/commitdiff
Attempt to make juniper alarms more robust
authorTom Hughes <tom@compton.nu>
Wed, 26 Oct 2022 21:21:36 +0000 (22:21 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 26 Oct 2022 21:21:36 +0000 (22:21 +0100)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index 417641cf0b84943247359f2b6c214df128b52282..df1329147e5b6f585fdaa555c8565e771a31c645 100644 (file)
@@ -217,12 +217,12 @@ groups:
   - name: juniper
     rules:
       - alert: juniper fan alarm
-        expr: jnxOperatingState{jnxOperatingContentsIndex="4",jnxOperatingState!="running"} > 0
+        expr: sum_over_time(jnxOperatingState{jnxOperatingContentsIndex="4",jnxOperatingState!="running"}[5m]) > 0
         for: 5m
         labels:
           alertgroup: "{{ $labels.site }}"
       - alert: juniper power alarm
-        expr: jnxOperatingState{jnxOperatingContentsIndex="2",jnxOperatingState!="running"} > 0
+        expr: sum_over_time(jnxOperatingState{jnxOperatingContentsIndex="2",jnxOperatingState!="running"}[5m]) > 0
         for: 5m
         labels:
           alertgroup: "{{ $labels.site }}"