Webhook fields namespace empty

Lephisto

Well-Known Member
Jun 22, 2019
176
18
58
47
Hi,

I have setup matrix-hookshot to manage Notifications from my Clusters in a way that makes sense.

Somehow I am struggling in getting all Information I need to the Messages. Besides the Message and severity I want to have the Hostname that emitted the message, and basically all Data that should be - according to the documentation on /docs/notifications.html#notification-events in the fields Sub-namespace. But it's empty as it seems:

This is my webhook Body:

Code:
{
  "hostname": "{{ fields.hostname }}",
  "title": "{{ escape title }}",
  "message": "{{ escape message }}",
  "severity": "{{ escape severity }}",
  "fields": {{ json fields }}
}

And this is how the Message is emitted:

Code:
{
  "hostname": "",
  "title": "Test notification ",
  "message": "This is a test of the notification target 'matrix-hookshot'.\n",
  "severity": "info",
  "fields": {}
}

Do I actually miss something here? Having this issue both on PBS and PVE.

regards,
Bastian
 
// edit:

I think I got it now: the fields variable is not populated when testing a webhook.