prometheus / prometheus/alertmanager

Alertmanager resends the notifications after reloading the configuration

Open
#3,410 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component/notify stale
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

How to recreate the scenario:
  1. Configure the receiver and route. (I used slack as the receiver)
  2. Send an alert to the alertmanager. You should receive some notification on your receiver.
  3. Now, make changes in the alertmanager's configuration(try group_by or matchers) and call the /-/reload endpoint.
    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:
  1. Alertmanager's cache should be cleaned once the /-/reload endpoint is called.
  2. Alertmanager should additionally provide a way to remove its cache. Probably, a endpoint /-/clear
  3. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.