How Can I Delete Alerts in Alertmanager

5,200 views
Skip to first unread message

Sean Lyons

unread,
Aug 10, 2018, 9:23:30 AM8/10/18
to Prometheus Users
I have a Pagerduty integration that I was testing by force-firing alerts as tests.  The test alerts are now continuing to fire, and I really want to just delete them entirely.  Is this possible with the Alertmanager API?  How would I get an ID for an alert to delete by ID?

Christian Hoffmann

unread,
Aug 11, 2018, 9:29:09 AM8/11/18
to Sean Lyons, Prometheus Users
Can you elaborate? How have you generated the test alerts in the first
place?

If they come from Prometheus, you would most likely want to have
Prometheus stop sending them (by removing the relevant rule if it was
just for testing or by reverting the monitored metric to normal values).

If you created alerts using some other way (API requests?) you should be
able to remove them using this method as well -- either just wait for
them to timeout (and stop sending them) or actively update it with an
updated endsAt attribute.

If this is a complete throw-away test setup, you may also choose to stop
all alertmanagers and empty your alertmanager data directories (which
drops all stateful data such as alerts and silences).

Just speculating though; to be more specific, I think we would need some
more details on your setup.

Kind regards,
Christian
Reply all
Reply to author
Forward
0 new messages