Hi,
I’m using Grafana V11.5 open source on a Debian host. On Grafana I’ve created alerts and a few of them are only relevant during office-hours. I’ve added mute-timings and a label in the alert to prevent the alert notifying outside business hours. So far so good.
I’d like to use the API to check for active alarms (with Nagios in this case).
I’ve found these API endpoints:
curl -s -k -N -X GET $URL/api/alertmanager/grafana/api/v2/alerts/
or
curl -s -k -N -X GET "$URL/api/alertmanager/grafana/api/v2/alerts/groups
The latter seems to be the most promising, but both endpoints do not return a property that the alert is muted by a mute-timing. Is there a way to achieve this?
Related question: The Alertmanager in Grafana is the Prometheus Alertmanager, right? What version is used? I’m asking this because the main branch of the Prometheus Alertmanager seems to have the feature I need. See here: alertmanager/api/v2/openapi.yaml at main · prometheus/alertmanager · GitHub and #3513: Show muted alerts in the Alert Groups API by grobinson-grafana · Pull Request #3797 · prometheus/alertmanager · GitHub
Thanks,
Sjoerd.