prometheus: monitor link usage for switches
This commit is contained in:
parent
3e16224213
commit
a61c997366
1 changed files with 44 additions and 0 deletions
|
@ -44,4 +44,48 @@ prometheus__rules_switch:
|
||||||
ErrorRate: !unsafe '{{ printf "%.2f" $value }} %'
|
ErrorRate: !unsafe '{{ printf "%.2f" $value }} %'
|
||||||
Interface: !unsafe "{{ $labels.ifName }}
|
Interface: !unsafe "{{ $labels.ifName }}
|
||||||
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
||||||
|
- alert: SwitchInLinkUsage
|
||||||
|
expr:
|
||||||
|
100 * rate(ifHCInOctets[5m]) / (ifHighSpeed * 1000000 / 8) > 50
|
||||||
|
for: 5m
|
||||||
|
keep_firing_for: 10m
|
||||||
|
labels:
|
||||||
|
severity: warning
|
||||||
|
annotations:
|
||||||
|
Usage: !unsafe '{{ printf "%.2f" $value }} %'
|
||||||
|
Interface: !unsafe "{{ $labels.ifName }}
|
||||||
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
||||||
|
- alert: SwitchInLinkUsage
|
||||||
|
expr:
|
||||||
|
100 * rate(ifHCInOctets[5m]) / (ifHighSpeed * 1000000 / 8) > 80
|
||||||
|
for: 5m
|
||||||
|
keep_firing_for: 10m
|
||||||
|
labels:
|
||||||
|
severity: critical
|
||||||
|
annotations:
|
||||||
|
Usage: !unsafe '{{ printf "%.2f" $value }} %'
|
||||||
|
Interface: !unsafe "{{ $labels.ifName }}
|
||||||
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
||||||
|
- alert: SwitchOutLinkUsage
|
||||||
|
expr:
|
||||||
|
100 * rate(ifHCOutOctets[5m]) / (ifHighSpeed * 1000000 / 8) > 50
|
||||||
|
for: 5m
|
||||||
|
keep_firing_for: 10m
|
||||||
|
labels:
|
||||||
|
severity: warning
|
||||||
|
annotations:
|
||||||
|
Usage: !unsafe '{{ printf "%.2f" $value }} %'
|
||||||
|
Interface: !unsafe "{{ $labels.ifName }}
|
||||||
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
||||||
|
- alert: SwitchOutLinkUsage
|
||||||
|
expr:
|
||||||
|
100 * rate(ifHCOutOctets[5m]) / (ifHighSpeed * 1000000 / 8) > 80
|
||||||
|
for: 5m
|
||||||
|
keep_firing_for: 10m
|
||||||
|
labels:
|
||||||
|
severity: warning
|
||||||
|
annotations:
|
||||||
|
Usage: !unsafe '{{ printf "%.2f" $value }} %'
|
||||||
|
Interface: !unsafe "{{ $labels.ifName }}
|
||||||
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in a new issue