Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.33k stars 1.05k forks source link

Make it possible to customize the HTTP(s) POST notification #9508

Closed PRTGC closed 10 months ago

PRTGC commented 3 years ago

Currently there is no way to change the headers, Method and body of a HTTP POST notification.

This requires the receiving system to do the translation. What is needed is an option like the custom E-Mail template.

It should work pretty much like the E-Mail template The input fields should be URL: http|https://Server{:port}/path/key/val.......?junk=val HTTP Method: GET|POST|DELETE|... Custom Heaaders: Header: value X-CustomerToken: value

Body: Same layout as Email Template

Why?

The receiving system does not accept the default post method body and there is no way to change it.

Make it just like the Email Template... Then I can do something like this:

<EVENT>
  <TITLE>${event_definition_title}</TITLE>
 <Description>${event_definition_description}</Description>
 <EVENTTYPE>${event_definition_type}</EVENTTYPE>
<Fields>
${foreach event.fields field}  <FIELD>${field.key}</FIELD> <VALUE>${field.value}</VALUE>
${end}
</Fields>
...
${foreach backlog message}
<MESSAGE>${message}<MESSAGE>
${end}
</MESSAGES>
${end}
</EVENT>

Your Environment

kingzacko1 commented 10 months ago

Closed with #16758.