Skip to content

Commit

Permalink
Adding metal-api switch rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Sep 22, 2023
1 parent da92d36 commit f34807a
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,24 @@ additionalPrometheusRulesMap:
severity: "warning"
annotations:
description: "{{ $value }}% of {{ $labels.networkId }} network prefixes in {{ $labels.partition }} are in use."
"switch.rules":
groups:
- name: switch.rules
rules:
- alert: SwitchSyncFailing
expr: metal_switch_sync_failed != 0
for: 10m
labels:
severity: critical
annotations:
summary: "Switch sync failing on {{ $labels.switchname }}"
description: "{{ $labels.switchname }} in partition {{ $labels.partition }} is failing for more than 10 minutes."
- alert: SwitchSyncSlow
expr: avg by (switchname) (metal_switch_sync_durations_ms) > 2000
for: 5m
labels:
severity: warning
annotations:
summary: "Switch sync is slow on {{ $labels.switchname }}"
description: "Average sync duration of {{ $labels.switchname }} in partition {{ $labels.partition }} is exceeding two seconds for more than 5 minutes."
{% endraw %}

0 comments on commit f34807a

Please sign in to comment.