Skip to content

Commit c85dd94

Browse files
author
Gianni Stubbe
committed
fix: Updated alerting for interfaces to make them usable in matrix
1 parent 68b85e9 commit c85dd94

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

playbooks/host_files/beokpdcovm01/files/prometheus/alerts.d/networking.rules.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ groups:
99
summary: "IDLE - {{ $labels.peer }}:AS{{ $labels.peer_as }} - {{ $labels.peer_desc }}"
1010

1111
- alert: Interface offline
12-
expr: ifOperStatus{ifDescr!~".*LOCAL_MGMT", ifDescr!~".*NOMON", device_role!="switch"} != 1 and ifAdminStatus==1
12+
expr: >-
13+
(ifOperStatus{ifDescr!~".*LOCAL_MGMT", ifDescr!~".*NOMON", device_role!="switch"} != 1
14+
and on (job, instance, ifIndex) ifAdminStatus == 1)
15+
* on (job, instance, ifIndex) group_left (ifAlias) ifAlias
1316
for: 10m
17+
annotations:
18+
summary: >-
19+
{{ $labels.node_name }} interface {{ $labels.ifDescr }}{{ if $labels.ifAlias }}
20+
({{ $labels.ifAlias }}){{ end }} is down
1421
1522
- alert: High CPU Usage
1623
expr: (avg by (node_name) (hrProcessorLoad)) > 75

playbooks/host_files/otgkit01vm01/files/prometheus/alerts.d/networking.rules.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ groups:
99
summary: "IDLE - {{ $labels.peer }}:AS{{ $labels.peer_as }} - {{ $labels.peer_desc }}"
1010

1111
- alert: Interface offline
12-
expr: ifOperStatus{ifDescr!~".*LOCAL_MGMT", ifDescr!~".*NOMON", device_role!="switch"} != 1 and ifAdminStatus==1
12+
expr: >-
13+
(ifOperStatus{ifDescr!~".*LOCAL_MGMT", ifDescr!~".*NOMON", device_role!="switch"} != 1
14+
and on (job, instance, ifIndex) ifAdminStatus == 1)
15+
* on (job, instance, ifIndex) group_left (ifAlias) ifAlias
1316
for: 10m
17+
annotations:
18+
summary: >-
19+
{{ $labels.node_name }} interface {{ $labels.ifDescr }}{{ if $labels.ifAlias }}
20+
({{ $labels.ifAlias }}){{ end }} is down
1421
1522
- alert: High CPU Usage
1623
expr: (avg by (node_name) (hrProcessorLoad)) > 75

0 commit comments

Comments
 (0)