mostly fixes, some new scripts
[distro-setup] / filesystem / etc / prometheus / rules / iank.yml
index 0ee3335fdbd76bef63547daca50fc9bc41d321e6..971e392fd63b55387089c47529060ebd91543d03 100644 (file)
@@ -44,7 +44,10 @@ groups:
 
 ###### END MISC NOTES ######
 
-
+# various queries only look at increases, so invert the up metric so we
+# can better query on down.
+  - record: down
+    expr: up == bool 0
 
 
 # alerting on missing metrics:
@@ -112,15 +115,6 @@ groups:
     annotations:
       summary: '12 minutes down'
 
-  # 42 mins: enough for a 30 min queue run plus 12
-  - alert: mailtest_check_vps
-    expr: |-
-      time() - mailtest_check_last_usec{job="tlsnode"} >= 60 * 42
-    labels:
-      severity: prod
-    annotations:
-      summary: '42 minutes down'
-
   - alert: mailtest_check_mailhost
     expr: |-
       time() - max by (folder,from) (mailtest_check_last_usec{job="node"}) >= 60 * 12
@@ -130,9 +124,9 @@ groups:
       summary: '12 minutes down'
 
   # 42 mins: enough for a 30 min queue run plus 12
-  - alert: mailtest_check_mailhost
+  - alert: mailtest_check_gnu_mailhost
     expr: |-
-      time() - max by (folder,from) (mailtest_check_last_usec{job="node"}) >= 60 * 42
+      time() - max by (folder,from) (mailtest_check_last_usec{folder="/m/md/l/testignore", from="iank@gnu.org"}) >= 60 * 42
     labels:
       severity: prod
     annotations:
@@ -175,11 +169,11 @@ groups:
 # avg_over_time(node_systemd_unit_state{name="dynamicipupdate.service",state="active"}[1d]) < .95
   - alert: up_resets
     expr: |-
-      resets(up[2d]) - changes(node_boot_time_seconds[2d]) > 12
+      resets(up[1d]) - changes(node_boot_time_seconds[1d]) > 12
     labels:
       severity: warn
     annotations:
-      summary: "Target has gone down {{ $value }} times in 2 days, > 12"
+      summary: "Target has gone down {{ $value }} times in 1 day, > 12"