From 4c61d2bc18a1b89179360c8bf196b01112a47083 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Thu, 2 Nov 2023 06:11:32 +0100 Subject: [PATCH] prometheus: add bird bgp import alert rules --- group_vars/prom/prometheus.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/group_vars/prom/prometheus.yml b/group_vars/prom/prometheus.yml index f2dc973..9404e88 100644 --- a/group_vars/prom/prometheus.yml +++ b/group_vars/prom/prometheus.yml @@ -335,6 +335,17 @@ prometheus__alert_rules_bird: severity: critical annotations: Session: !unsafe "{{ $labels.name }}" + - alert: BirdBGPNoImportedPrefixRedundant + expr: + bird_protocol_prefix_import_count{ + import_filter!="REJECT", + } * on (instance, name) ( + bird:protocol_up:bgp:redundant{state="Established"} + ) == 0 + for: 0m + labels: + severity: critical + annotations: - alert: BirdBGPNoExportedPrefixNonRedundant expr: sum by (group) ( @@ -349,6 +360,20 @@ prometheus__alert_rules_bird: severity: critical annotations: Session: !unsafe "{{ $labels.name }}" + - alert: BirdBGPNoImportedPrefixNonRedundant + expr: + sum by (group) ( + bird_protocol_prefix_import_count{ + import_filter!="REJECT", + } * on (instance, name) group_left (group) ( + bird:protocol_up:bgp:non_redundant{state="Established"} + ) + ) == 0 + for: 0m + labels: + severity: critical + annotations: + Session: !unsafe "{{ $labels.name }}" - alert: BirdOSPFNeighboursChange expr: changes(bird_ospf_neighbor_count[5m]) > 0