Webhook Notification No Data Sent

Greetings,
We’ve been using Grafana for several years now, since version 6. Now that were using the new (version 9) notifications / alerting / contact point schemes, we’re running into problems with the Webhook type notification.

Basically, it doesn’t seem to be posting any data. The webhook URL is correct and the remote server is receiving a POST request from Grafana, but the data captured has no JSON, or any other kind of info in it. When I do a test send in the Contact Point section, all we’re receiving on the server side is, “1”.

In fact, it doesn’t even seem to be triggering at all when the alert is actually firing. Although the Slack type Contact Point does get alert notifications, Webhook does not, even though I seem to have configured the alert labels, etc. similarly and I would expect that the notification would come through.

I must be missing something, but I don’t know what it is, as the documentation is pretty sparse.

Thanks for anyone’s insight here.

Looks like I’ve figured this out. For anyone who might be having the same problems:

  1. PHP won’t evaluate POST data sent from Grafana with the application/json header with the $_POST variable. I had to use:
    $json = json_decode(file_get_contents('php://input'));
  2. The webhook wasn’t being triggered normally, still not sure why, but I changed the alerting label in the alert rules, and updated the matching label in the corresponding notification policy. At that point it started working. (It might have been related to the Repeat Interval, which had a default setting of no repeat.)