From 29a3b5a758d277fdce442ab27aff7124746ce816 Mon Sep 17 00:00:00 2001 From: Laurent CREPET Date: Mon, 5 Jan 2026 18:13:49 +0100 Subject: [PATCH] Use matchers for inhibit rules examples (#4131) * This file is used when building binaries, while using deprecated {source,target}_match. * Backport of commit 0ed31c3311c66eda25677b6f81aa123809b4109a from beorn7 Signed-off-by: LCT --- examples/ha/alertmanager.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/ha/alertmanager.yml b/examples/ha/alertmanager.yml index 7bd5e0c5d..8f79edb9d 100644 --- a/examples/ha/alertmanager.yml +++ b/examples/ha/alertmanager.yml @@ -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]