prometheus / prometheus/alertmanager
Feature request: Extend "new silence" form to pass creator as GET parameter
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
My goal is to create silences right from an alert receiver, similar to Grafana's alerting implementation (they provide a field silenceURL along the alert webhook JSON).
I stumbled upon an older blog post by Brian about pre-populating silence URLs, but noticed there is no way to set the creator. Looking through the alertmanager code, I tried adding it to the files in ui/app/src/Views/SilenceForm/, but couldn't get the form to pick up the new GET parameter. I haven't worked with Elm before, and it takes a bit to wrap my head around it.
So far, the only way to do this is setting the "defaultCreator" key in the browser's localStorage. But as it is not exposed through the UI, that makes it tedious to set in a mobile browser, for example.
Instead, it would be nice to pass the name/mail from an alert receiver right into a new silence.
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 in ui/app/src/Views/SilenceForm/ and inspect how the form currently reads URL parameters and the defaultCreator value from localStorage. Trace the existing pre-populated silence URL behavior, then determine the expected creator parameter and verify that a new silence form displays it as the creator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm, go
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100