# Request: http Notification template

**URL:** <https://community.graylog.org/t/request-http-notification-template/17864>\
**Category:** How Are We Doing? Suggestion Box\
**Created:** [November 16, 2020, 7:51pm UTC](https://community.graylog.org/t/request-http-notification-template/17864 "2020-11-16T19:51:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jra](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jra/32/7476_2.png) [@jra](https://community.graylog.org/u/jra)\
**Post date:** [November 16, 2020, 7:51pm UTC](https://community.graylog.org/t/request-http-notification-template/17864/1 "2020-11-16T19:51:20Z")

</div>

Hi…  
Would it be possible to have a template for the HTTP Notification, like the email template ?  
([https://docs.graylog.org/en/3.3/pages/alerts.html](https://docs.graylog.org/en/3.3/pages/alerts.html))  
It would be perfect if that that was possible.  
It would make it sooo much more flexible…  
It is more difficult to do the translation on the receiving side…  
Something like:  
URL: [https://myserver.com](https://myserver.com){:port}/path/token/blah  
Method: POST|GET|UPDATE|…  
Custom Headers: …  
Templare:

```auto
<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>

```

That would be awesome.  
Thanks  
JR

---

<div class="post-metadata">

**Author:** ![ttsandrew](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@ttsandrew](https://community.graylog.org/u/ttsandrew)\
**Post date:** [November 16, 2020, 10:47pm UTC](https://community.graylog.org/t/request-http-notification-template/17864/2 "2020-11-16T22:47:27Z")

</div>

Hello @jra, it looks like there’s a feature request open for this already.

> <https://github.com/Graylog2/graylog2-server/issues/4569>
>
> Support for HTML email alerts/notifications
> Expected Behavior
> Either configurable or on by default, would be helpful in formatting and general visibility of the...

Feel free to tack on!

---

<div class="post-metadata">

**Author:** ![jra](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jra/32/7476_2.png) [@jra](https://community.graylog.org/u/jra)\
**Post date:** [November 16, 2020, 11:05pm UTC](https://community.graylog.org/t/request-http-notification-template/17864/3 "2020-11-16T23:05:22Z")

</div>

Hi…

Not quite…  
The one you are referencing is to make it an HTML template for mail working correctly.

This request is to make it possible to make a custom body and headers for an HTTP push notification.  
Currently it only supports a fixed HTTP POST Body…

[From the help file](https://docs.graylog.org/en/3.3/pages/alerts.html):  
HTTP alert notification  
The HTTP alert notification lets you configure an endpoint that will be called when the alert is triggered.

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.

Here is an example of the payload included in a notification:

```auto
{
  "event_definition_id": "this-is-a-test-notification",
  "event_definition_type": "test-dummy-v1",
  "event_definition_title": "Event Definition Test Title",
  "event_definition_description": "Event Definition Test Description",
  "job_definition_id": "<unknown>",
  "job_trigger_id": "<unknown>",
  "event": {
    "id": "NotificationTestId",
    "event_definition_type": "notification-test-v1",
    "event_definition_id": "EventDefinitionTestId",
    "origin_context": "urn:graylog:message:es:testIndex_42:b5e53442-12bb-4374-90ed-0deadbeefbaz",
    "timestamp": "2020-05-20T11:35:11.117Z",
    "timestamp_processing": "2020-05-20T11:35:11.117Z",
    "timerange_start": null,
    "timerange_end": null,
    "streams": [
      "000000000000000000000002"
    ],
    "source_streams": [],
    "message": "Notification test message triggered from user <admin>",
    "source": "000000000000000000000001",
    "key_tuple": [
      "testkey"
    ],
    "key": "testkey",
    "priority": 2,
    "alert": true,
    "fields": {
      "field1": "value1",
      "field2": "value2"
    }
  },
  "backlog": []
}

```

---

<div class="post-metadata">

**Author:** ![ttsandrew](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@ttsandrew](https://community.graylog.org/u/ttsandrew)\
**Post date:** [November 16, 2020, 11:07pm UTC](https://community.graylog.org/t/request-http-notification-template/17864/4 "2020-11-16T23:07:33Z")

</div>

Good point. You should make a new feature request on GitHub for this.

---

<div class="post-metadata">

**Author:** ![jra](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jra/32/7476_2.png) [@jra](https://community.graylog.org/u/jra)\
**Post date:** [November 16, 2020, 11:18pm UTC](https://community.graylog.org/t/request-http-notification-template/17864/5 "2020-11-16T23:18:29Z")

</div>

🕶 Will do…

Done [https://github.com/Graylog2/graylog2-server/issues/9508](https://github.com/Graylog2/graylog2-server/issues/9508)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [November 30, 2020, 11:18pm UTC](https://community.graylog.org/t/request-http-notification-template/17864/6 "2020-11-30T23:18:30Z")

</div>

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