Http notification body is empty

Hello.
I have configured notifications via HTTP, but the requests are coming without a message body. There is also no body template field in the notification settings.
Searching didn’t lead me to similar problems, so I’m guessing I’m doing something wrong.
I’m running graylog in docker.

image: "${GRAYLOG_IMAGE:-graylog/graylog:5.2}"

version: Graylog 5.2.5+7eaa89d

Endpoint - PHP script. For debugging, I dump all the variables (var_dump(get_defined_vars())) and get the following:

array(4) {
  ["_GET"]=>
  array(1) {
    ["tk"]=>
    string(16) "my_verify_key"
  }
  ["_POST"]=>
  array(0) {
  }
  ["_COOKIE"]=>
  array(0) {
  }
  ["_FILES"]=>
  array(0) {
  }
}

I attach a screenshot of the notification settings.
How can I get the data of the message that triggered the alert?

Hey @byy

Did you see this here

Hello, @gsmith
Yes, of course, I read this instruction several times. It states that

Graylog will send a POST request to the notification URL including information about the alert. The body of the request is the JSON encoded data described above.

but as I said in the first message, the body in the incoming request is empty.

HTTP Notifications are a bit more limited than Email notifications:
message is the title of the notification.
Additional text as well as fields from the associated log can be added as custom fields of the event definition. The notification will include all the custom field values.

1 Like

oh, sorry, I didn’t think that json comes in the body…
Thank you!

for those who make the same mistake - look at php://input

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.