Prometheus creates a time series for every alert, under the metric
name ALERTS. You can then do various reporting and visualization of
past alerts in Grafana based on this metric. This doesn't get you quite
exactly what alerts triggered in Alertmanager, because it doesn't
capture Alertmanager's delays if you've set them (or grouping).
Grafana's native panels don't make for really great visualizations
of alert timelines. Locally, we use a plugin for a third party panel
for this:
https://grafana.com/grafana/plugins/natel-discrete-panel/
Unfortunately there are limits for the information that's readily
extracted from Prometheus for this in numerical form. It's quite
difficult to report on things like a count of how many different
times a particular alert has been triggered or what the start (or
end) times of the alerts were. You can determine it from visual
inspection of when ALERTS time series were present on a graph that
visualizes them, though.
- cks