prometheus / prometheus/alertmanager
Support building alert filters before evaluating them
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
Currently, clicking on a single label's + in the alert list view immediately applies that filter. I would like to be able to delay this evaluation via holding down a key.
For example, I would like to hold ctrl, and click on multiple labels' +, which then appear in the filter, but do not get evaluated until I release ctrl. I can also click the x in the filter bar to remove the label, while still holding ctrl.
Selecting multiple labels with the same name will result in them being merged into a regex. For example, selecting instance="instance1", instance="instance2", and instance="instance3" would result in the "filter preview" (unapplied filter, because the user is still holding ctrl) showing instance=~"instance1|instance2|instance3". I'm unsure of doing this merging immediately or after releasing ctrl. Pros of doing the merging immediately (in the "preview" state) is that you can see the final filter and it looks "cleaner". Cons are if you mis-clicked a label and it was merged with another, you would have to either delete the whole label in "preview" mode, or release ctrl and then modify the label filter.
Negations would behave analogously, but with the user holding ctrl+shift.
Discussion points:
- Do we want this?
- Do we like the proposed modifiers?
ctrlfor positive filtering,ctrl+shiftfor negation - Do we want to merge labels immediately (into their regex match/regex negation forms), or after the user releases the modifier key?
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
The issue names the alert list view, label + and x controls, and filter bar as entry points; first resolve the modifier-key and regex-merging questions before locating their implementation. Done means multiple positive and negative labels can be staged, edited, merged as agreed, and evaluated only when the modifier is released.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100