prometheus / prometheus/alertmanager
Alertmanager resends the notifications after reloading the configuration
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
How to recreate the scenario:
- Configure the receiver and route. (I used slack as the receiver)
- Send an alert to the alertmanager. You should receive some notification on your receiver.
- Now, make changes in the alertmanager's configuration(try
group_byormatchers) and call the/-/reloadendpoint.
Now, you will receive the notifications for the same alerts again.
NOTE: These behaviours are only observed when the same alerts exist in alertmanager's cache and the configuration is reloaded.
Expected Behavior:
We should not get notifications for alerts that we have previously received.
Solutions:
- Alertmanager's cache should be cleaned once the
/-/reloadendpoint is called. - Alertmanager should additionally provide a way to remove its cache. Probably, a endpoint
/-/clear - Alertmanager should additionally maintain track of the alerts that have previously been notified and deliver notifications in response to reloads.
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 at the /-/reload endpoint and trace how alert state and notification history are retained across configuration reloads. Reproduce the scenario with changes to group_by or matchers, then verify that already-notified alerts do not generate duplicate notifications after reload; the issue lists cache clearing and notification tracking as possible directions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, prometheus
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100