]> git.openstreetmap.org Git - chef.git/commitdiff
Add load average alert
authorTom Hughes <tom@compton.nu>
Mon, 5 Aug 2024 13:53:06 +0000 (14:53 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 5 Aug 2024 13:53:06 +0000 (14:53 +0100)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index b78bbaddd51fb8a54cc2834c4815f28a45c85af4..dfd885bb8055252fd72a99df4807eeba1f6c956c 100644 (file)
@@ -331,6 +331,15 @@ groups:
           alertgroup: "{{ $labels.site }}"
         annotations:
           power: "{{ $value }} dBm"
+  - name: load
+    rules:
+      - alert: load average
+        expr: sum(node_load5) by (instance) / count(node_cpu_frequency_max_hertz) by (instance) > 2
+        for: 5m
+        labels:
+          alertgroup: "{{ $labels.instance }}"
+        annotations:
+          load: "{{ $value | humanizePercentage }}"
   - name: mail
     rules:
       - alert: exim down