alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

Inhibit alerts by groupname matcher

Open sed-i opened this issue 2 years ago • 1 comments

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

sed-i avatar Jul 05 '22 18:07 sed-i

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.

gotjosh avatar Jul 06 '22 11:07 gotjosh