Get Alerts in API with mute-timings property?

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.

The change you refer to was released in Alertmanager 0.28.0. Grafana is still on 0.27.0. We have plans to upgrade but are not there yet.

Thanks for the confirmation.
Any idea what version of Grafana will include Alertmanager 0.28.x?

Best regards,
Sjoerd.

I do not know. It could be Grafana 12 but no guarantee