wadimsewo
(Wadim Sewo)
April 20, 2021, 7:03am
1
Hello,
can someone tell me how to read graylog message ID in alerts template? We use Graylog 4 and unfortunately we could not find any info in the documentation.
A link to the message would be even better, of course. According to the documentation it should be ${event.id}. But with this no messages can be found.
Best regards,
Wadim
gsmith
(GSmith)
April 21, 2021, 12:19am
2
@wadimsewo
Hello and welcome
Maybe I can help.
${event.id} is the message ID of the stored event/s. This is the ID in Alerts & Events.
${message.id} is the The message ID. This would be the one you use to find the message.
Example:
Notification Template with Event ID and Message ID.
.
Notifcation Email received.
I hope helps.
wadimsewo
(Wadim Sewo)
April 22, 2021, 5:50am
3
Hi @gsmith ,
thanks for your reply.
I already read about ${message.id} but unfortunately it does not work. The value is completely empty.
This is my template:
And I receive this email:
shoothub
(Shoothub)
April 22, 2021, 10:20am
4
You can’t access ${message.id}
directly, you need to use inside loop foreach:
${foreach backlog message}
ID: ${message.id}
${end}
wadimsewo
(Wadim Sewo)
April 22, 2021, 11:08am
5
Hi @shoothub ,
I tried it out, but still no message ID
My template:
E-Mail:
shoothub
(Shoothub)
April 22, 2021, 12:30pm
6
Check if you have enabled Message backlog
and setup to 1
system
(system)
Closed
May 6, 2021, 9:25pm
8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.