alertmanager
alertmanager copied to clipboard
Inhibit alerts by groupname matcher
Currently an inhibit rule can take alertname
as a matcher, e.g.:
inhibit_rules:
- source_match:
alertname: InstanceDown
It could be handy if it was possible to use groupname
as a matcher as well, to be able to:
- inhibit entire alert groups.
- have alerts with the same name but in different groups, and inhibit only one of them.
groups:
- name: Instances
rules:
- alert: InstanceDown
expr: up == 0
This is an interesting thought.
The main problem here is that group is not something that's propagated to the Alertmanager or stored within Prometheus. Semantically, all that it means (for Prometheus) is "do the evaluation of these alerts sequentially".
I have a feeling, that this is a better discussion for https://github.com/prometheus/prometheus than what it is about the Alertmanager. We would need to figure out how to make Prometheus propagate this information first and then figure out what it means (semantically) for the Alertmanager.