prometheus / prometheus/alertmanager
Feature Request: add an optional not_equal field to inhibit_rules
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
The alerts in AlertManager may have severity labels to route alerts to the right receivers. It should also be possible to inhibit an alert with a lower severity level if an alert with a higher severity level and otherwise equal labels is present, e.g.:
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
not_equal: ['severity']
It does not work to simply put equal: ['alertname'] because the alert may consist of other labels that should be considered. Currently, it is possible to specify the labels that should be equal, but it should also be possible to specify a list of labels that should not be equal, so that the other labels can be compared for equality without necessarily knowing the label names in advance.
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.
Research direction
Start with AlertManager's inhibit_rules handling and the existing equal-label comparison. Trace how source_match and target_match are evaluated, then verify the YAML example and confirm that not_equal labels are excluded from equality comparison while all other labels remain comparable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100