When an alert is fired, and when using the webhook notification channel, does anyone know where I can find out what that POST request looks like exactly? (I can’t put my finger on it in the docs).
The system that I’m trying to integrate with expects incoming requests to have certain parameters before they are accepted - I don’t see a means of modifying the content of the JSON object sent on the POST. Does anyone know if that is possible?
Hi! You can find it documented here!
You’re a star! Thank you!
Hey George - I’m new to Prometheus/ Grafana. From what I understand, there is a ‘Prometheus AlertManager’ and a ‘Grafana AlertManager’ - do they post the payload?
I guess what I’m trying to figure out - can I have alerts sent directly from Grafana in that format - or do I need to pass them to an external AlertMamager (Prometheus) before sending it on to the system I’m trying to integrate with?
Grafana Alertmanager is a “fork” of Prometheus Alertmanager with some extra features! In both cases, the JSON webhook data is more or less the same, except Grafana has an extra
values field for each alert.
Awesome - thanks your insight on this one George.
Am I correct in saying the ‘tags’ we configure when creating the rule populate the ‘“labels”: ‘ portion of the alert payload?
currently running version 8.
Hi! Are you using the old Grafana dashboard alerts or the new Grafana (Unified) Alerts? If the former the the JSON format I shared with you earlier is incorrect. I assumed you were on the new Grafana Alerting which it sounds like might not be the case
Hey George - I suspect I’m running the older version (8.3.6)?
Hi! When you create an alert does the page look like this?
It does not….
I’ve attached a screenshot from my alerting page.
Hi! OK! You’re using the legacy dashboard alerts, which uses a different JSON format from Prometheus Alertmanager and Grafana Managed Alerts.
Just to give you some advanced warning, legacy dashboard alerts are deprecated and will be removed next year in Grafana 11, so you might want to also look into upgrading to Grafana Managed Alerting at some point too.
However, to answer your original question, the JSON format for webhook notifications from legacy dashboard alerts can be found here.