prometheus / prometheus/alertmanager
[feature request] matchers to work with annotations
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
What did you do?
In prometheus, labels have a very different semantics. For a given time series with label A,B,C with some values, any change to those values results in a completely different time series
For alerts, this is especially troublesome. Often, we use severity labels to denote the criticality of alerts. Changing these labels means that we lose continuity between the fired alerts vs the newly defined alert
This new alert goes through its own alert lifecycle in prometheus ( starts from pending -> fired ). This becomes a nuisance while configuring the alertmanager as previous alert with a different criticality ends up "resolved" giving misinformation about the ongoing problem
Annotations OTOH are orthogonal to labels. Changing them ensures continuity.
What did you expect to see?
Matchers that match against annotations. Severity then can be marked as an annotation rather than a label.
What did you see instead? Under which circumstances?
Matchers only work with labels
Environment
k8s
-
System information:
insert output of
uname -srmhere -
Alertmanager version:
0.24.0
- Prometheus version:
2.49.1
- Alertmanager configuration file:
na
- Prometheus configuration file:
na
- Logs:
na
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 by locating Alertmanager's existing matcher handling and how alert labels and annotations are represented. Clarify the matching semantics and configuration surface for annotations, then define tests covering annotation matches and alert continuity; the issue does not identify specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100