]> git.openstreetmap.org Git - chef.git/commitdiff
Add some SMART alert rules
authorTom Hughes <tom@compton.nu>
Sun, 14 Nov 2021 16:25:05 +0000 (16:25 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 14 Nov 2021 16:25:05 +0000 (16:25 +0000)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index fd25f2523498188e9c0e0238805ab551d06e40ce..4511e1eac4123ad745924a437ac568d1d06b82df 100644 (file)
@@ -204,6 +204,20 @@ groups:
           alertgroup: "{{ $labels.instance }}"
         annotations:
           queries: "{{ $value }}"
+  - name: smart
+    rules:
+      - alert: smart failure
+        expr: smart_health_status == 0
+        for: 60m
+        labels:
+          alertgroup: "{{ $labels.instance }}"
+      - alert: smart ssd wearout approaching
+        expr: smart_percentage_used >= 90
+        for: 60m
+        labels:
+          alertgroup: "{{ $labels.instance }}"
+        annotations:
+          percentage_used: "{{ $value | humanizePercentage }}"
   - name: ssl
     rules:
       - alert: ssl certificate probe failed