In theory Alertmanager keeps resolved alerts around for a generally
short interval, between when Prometheus tells Alertmanager that the
alert is resolved and when the alert group's group_interval allows
Alertmanager to successfully send a notification about it, but I don't
know if Alertmanager shows such alerts in the API. In any case, even if
they briefly show up in Alertmanager's API, as Brian Candler says it's
not a useful way to see what alerts Alertmanager sent 'resolved'
notifications about because they don't stick around for the long term.
(These lingering resolved alerts sometimes can have interesting
interactions with inhibitions and I believe it's one cause of getting a
'alert resolved' notification when you never saw the corresponding
'alert firing'.)
In general if you want to know the history of past Alertmanager
activities, I think you should set up a webhook that gets included in
every notification group and either logs the data or puts it in a
database (this is what we eventually wound up doing). If you just want
what Prometheus alerts were firing, you can get that from Prometheus
with suitable queries, although the queries get tricky if you want to
know things like how many times an alert triggered and was resolved.
- cks
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
prometheus-use...@googlegroups.com.
> To view this discussion visit
>
https://groups.google.com/d/msgid/prometheus-users/2f4d06b6-7028-4781-86ba-4406ca4d7d97n%40googlegroups.com.