Prometheus generates timeseries ALERTS and ALERTS_FOR_STATE that you can query to get a history of triggering alerts. e.g.
ALERTS{alertname="ProbeFail", alertstate="firing", instance="gw1-he", job="blackbox", module="icmp", severity="critical"} => 1 @[1603968515.41]
ALERTS_FOR_STATE{alertname="ProbeFail", instance="gw1-he", job="blackbox", module="icmp", severity="critical"} => 1603378977 @[1603968515.41]
You can get also prometheus to scrape alertmanager:
- job_name: alertmanager
scrape_interval: 1m
static_configs:
- targets: ['localhost:9093']
This gives you additional statistics around notifications, e.g. failed and successful notification deliveries.
If you just want to show currently firing alerts and/or silences, then use the alertmanager API. This is what alertmanager front-ends like
karma do.