Use matchers for inhibit rules examples
* 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:
parent
82b89dc769
commit
b82b91c831
|
@ -9,8 +9,11 @@ receivers:
|
||||||
webhook_configs:
|
webhook_configs:
|
||||||
- url: 'http://127.0.0.1:5001/'
|
- url: 'http://127.0.0.1:5001/'
|
||||||
inhibit_rules:
|
inhibit_rules:
|
||||||
- source_match:
|
- source_matchers: [severity="critical"]
|
||||||
severity: 'critical'
|
target_matchers: [severity="warning"]
|
||||||
target_match:
|
# Apply inhibition if the alertname is the same.
|
||||||
severity: 'warning'
|
# CAUTION:
|
||||||
equal: ['alertname', 'dev', 'instance']
|
# 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]
|
||||||
|
|
Loading…
Reference in New Issue