mirror of
https://github.com/prometheus/alertmanager.git
synced 2026-02-05 06:45:45 +01:00
Use matchers for inhibit rules examples (#4131)
* This file is used when building binaries, while using deprecated
{source,target}_match.
* Backport of commit 0ed31c3311
from beorn7 <beorn@grafana.com>
Signed-off-by: LCT <lct@lct.pw>
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user