How to make Grafana use the alertmanager v2 REST API?

Since upgrading to Grafana 10.3 and Prometheus Alertmanager 0.27.x I’m getting this deprecation error message from alertmanager:

Failed to send test alert.: failed to send alert to Alertmanager: failed to send HTTP request - status code 410

Alertmanager tells me:
level=warn msg=“HTTP request failed” url=http://prometheus-kube-prometheus-alertmanager:9093/api/v1/alerts statusCode=“410 Gone” Body=“{"status":"deprecated","error":"The Alertmanager v1 API was deprecated in version 0.16.0 and is removed as of version 0.28.0 - please use the equivalent route in the v2 API"}”

So how do I make Grafana to use the v2 REST API of alertmanager? There is not config option to choose the version.

Sidenote: I do provision my alerting files. So my contactpoint.yaml looks like this:

apiVersion: 1

Hi! You need to update to Grafana 10.4 grafana/ at main · grafana/grafana · GitHub.


Yes! Upgraded to 10.4 and it works again. Thank you.

1 Like