2023-11-02 20:27:45 +01:00
|
|
|
---
|
|
|
|
prometheus__rules_switch:
|
|
|
|
- alert: SwitchPromiscuousChange
|
|
|
|
expr:
|
|
|
|
changes(ifPromiscuousMode[5m]) > 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
|
|
|
- alert: SwitchInterfaceUpChange
|
|
|
|
expr:
|
|
|
|
changes(ifOperStatus{ifOperStatus="up"}[5m]) > 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
|
|
|
- alert: SwitchInErrors
|
|
|
|
expr:
|
2023-11-04 13:33:06 +01:00
|
|
|
irate(ifInErrors[5m]) / (
|
2023-11-02 20:27:45 +01:00
|
|
|
irate(ifInUcastPkts[5m])
|
|
|
|
+ irate(ifInNUcastPkts[5m])
|
2023-11-04 13:33:06 +01:00
|
|
|
) > 0.0001
|
2023-11-02 20:27:45 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-04 13:33:06 +01:00
|
|
|
ErrorRate: !unsafe "{{ $value | humanizePercentage }} %"
|
2023-11-02 20:27:45 +01:00
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
|
|
|
- alert: SwitchOutErrors
|
|
|
|
expr:
|
2023-11-04 13:33:06 +01:00
|
|
|
irate(ifOutErrors[5m]) / (
|
2023-11-02 20:27:45 +01:00
|
|
|
irate(ifOutUcastPkts[5m])
|
|
|
|
+ irate(ifOutNUcastPkts[5m])
|
2023-11-04 13:33:06 +01:00
|
|
|
) > 0.0001
|
2023-11-02 20:27:45 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-04 13:33:06 +01:00
|
|
|
ErrorRate: !unsafe "{{ $value | humanizePercentage }} %"
|
2023-11-02 20:27:45 +01:00
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
2023-11-03 20:50:34 +01:00
|
|
|
- alert: SwitchInLinkUsage
|
|
|
|
expr:
|
2023-11-04 13:33:06 +01:00
|
|
|
rate(ifHCInOctets[5m]) / (ifHighSpeed * 1000000 / 8) > 0.5
|
2023-11-03 20:50:34 +01:00
|
|
|
for: 5m
|
|
|
|
keep_firing_for: 10m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-04 13:33:06 +01:00
|
|
|
Usage: !unsafe "{{ $value | humanizePercentage }} %"
|
2023-11-03 20:50:34 +01:00
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
|
|
|
- alert: SwitchInLinkUsage
|
|
|
|
expr:
|
2023-11-04 13:33:06 +01:00
|
|
|
rate(ifHCInOctets[5m]) / (ifHighSpeed * 1000000 / 8) > 0.8
|
2023-11-03 20:50:34 +01:00
|
|
|
for: 5m
|
|
|
|
keep_firing_for: 10m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-04 13:33:06 +01:00
|
|
|
Usage: !unsafe "{{ $value | humanizePercentage }} %"
|
2023-11-03 20:50:34 +01:00
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
|
|
|
- alert: SwitchOutLinkUsage
|
|
|
|
expr:
|
2023-11-04 13:33:06 +01:00
|
|
|
rate(ifHCOutOctets[5m]) / (ifHighSpeed * 1000000 / 8) > 0.5
|
2023-11-03 20:50:34 +01:00
|
|
|
for: 5m
|
|
|
|
keep_firing_for: 10m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-04 13:33:06 +01:00
|
|
|
Usage: !unsafe "{{ $value | humanizePercentage }} %"
|
2023-11-03 20:50:34 +01:00
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
|
|
|
- alert: SwitchOutLinkUsage
|
|
|
|
expr:
|
2023-11-04 13:33:06 +01:00
|
|
|
rate(ifHCOutOctets[5m]) / (ifHighSpeed * 1000000 / 8) > 0.8
|
2023-11-03 20:50:34 +01:00
|
|
|
for: 5m
|
|
|
|
keep_firing_for: 10m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-04 13:33:06 +01:00
|
|
|
Usage: !unsafe "{{ $value | humanizePercentage }} %"
|
2023-11-03 20:50:34 +01:00
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
2023-11-02 20:27:45 +01:00
|
|
|
...
|