Reputation: 1865
I have the following inhibit rule:
######## INHIBIT RULES ########
# Inhibit Rules: https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
# Apply inhibition if the alertname is the same on the same host.
equal: ['alertname', 'instance', 'url']
###############################
This work 99% of the time as intended, however, some members would like their monitored devices to ignore the inhibit rule.
Is there a way I can add a label to those targets/rules so that:
if label ignore_inhibit is true
do not inhibit
else
proceed as planned
(I know how to add the label, I just don't know how to make alertmanagere ignore that label if it is possible)
Upvotes: 0
Views: 2738
Reputation: 22311
Use the following inhibit_rules:
inhibit_rules:
- source_match:
severity: 'critical'
target_matchers:
matchers: [ severity = warning, ignore_inhibit != true ]
equal: ['alertname', 'instance', 'url']
Upvotes: 1