From 2e92afd15fdc5dd832bd975aa0cdd9caa0bff8a1 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 13 Oct 2023 17:54:51 +0100 Subject: [PATCH] Add alert for interface redundancy --- cookbooks/prometheus/templates/default/alert_rules.yml.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 6dc966050..d8671699c 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -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 -- 2.39.5