]> git.openstreetmap.org Git - chef.git/commitdiff
Add alert for interface redundancy
authorTom Hughes <tom@compton.nu>
Fri, 13 Oct 2023 16:54:51 +0000 (17:54 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 13 Oct 2023 16:54:51 +0000 (17:54 +0100)
cookbooks/prometheus/templates/default/alert_rules.yml.erb

index 6dc966050a50d043d9ad5515ed19bf78ab364f18..d8671699c2e6a1aa7088cc8d025ea70dab50f419 100644 (file)
@@ -416,6 +416,13 @@ groups:
           connections_used: "{{ $value | humanizePercentage }}"
   - name: network
     rules:
+      - alert: interface redundancy lost
+        expr: node_bonding_active < 2 and on (instance, master) label_replace(chef_network_interface{bond_mode="802.3ad"}, "master", "$1", "name", "(.*)")
+        for: 5m
+        labels:
+          alertgroup: "{{ $labels.instance }}"
+        annotations:
+          link_count: "{{ $value }}"
       - alert: interface transmit rate
         expr: rate(node_network_transmit_bytes_total[1m]) / node_network_speed_bytes > 0.99
         for: 5m