Skip to content

Commit

Permalink
Use matchers for inhibit rules examples
Browse files Browse the repository at this point in the history
* This file is used when building binaries, while using deprecated
  {source,target}_match.
* Backport of commit 0ed31c3
  from beorn7 <[email protected]>
  • Loading branch information
l-c-t committed Nov 20, 2024
1 parent 82b89dc commit 865c0b0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions examples/ha/alertmanager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ receivers:
webhook_configs:
- url: 'http://127.0.0.1:5001/'
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['alertname', 'dev', 'instance']
- source_matchers: [severity="critical"]
target_matchers: [severity="warning"]
# Apply inhibition if the alertname is the same.
# CAUTION:
# If all label names listed in `equal` are missing
# from both the source and target alerts,
# the inhibition rule will apply!
equal: [alertname, dev, instance]

0 comments on commit 865c0b0

Please sign in to comment.