prometheus / prometheus/alertmanager
Feature Request: Multiple Source Alerts For Inhibition Rules
@ultrotter is already working on this.
Since Nov 21, 2025.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
Currently, the alert manager inhibition rules support logic that allows the inhibition of an alert when a different alert exists.
While this functionality is great, it is lacking when more complex gating is desired.
The alert manager does not have a functionality supporting inhibiting an alert based on multiple sources.
For example, the following logic can't be expressed as an inhibition rule:
"Mute all alerts with {alertname="no_info", application="enricher"} if an alert with {alertname="instance_down", application="parser"}' exists AND an alert with {alertname="instance_down", application="writer}" exists."
This becomes increasingly apparent when wanting to define alerting rules which represent systems that don't follow a single, linear flow.
Suggested Solution:
Add support for multiple alert sources in the inhibition rules configuration.
Make the source section of the rule a list of sources, with a logical AND functionality between them. For example:
inhibit_rules:
- source:
- matchers:
- alertname="instance_down"
- application="parser"
equal: ["cluster"]
- matchers:
- alertname="instance_down"
- application="writer"
equal: ["severity"]
target_matchers:
- alertname="no_info"
- application="enricher"
Notes:
-
Supporting only logical AND is sufficient, since the alert manager already supports a logical OR, just by splitting the expression into two separate rules.
-
the
equalfield is configured per source matchers set. This is important to avoid coupling between sets.
Returning to the above example, the following alerts:
{alertname="instance_down", application="parser", cluster="A", severity="3"}
{alertname="instance_down", application="writer", cluster="B", severity="2"}
will cause the following alert to be inhibited:
{alertname="no_info", application="enricher", cluster="A", severity="2"}
Note that the first source alert's severity does not match the target alert's severity, and that the second source alert's cluster does not match the target alert's cluster. -
While this change can seems insignificant, it opens a door for a whole new world of advanced inhibition rules that were not possible to implement previously. Therefore, although this can result in some changes to the configuration, this feature (or one with a similar functionality) could be well worth the effort.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.