Message ID in Alerts

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

@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.

image

Example:
Notification Template with Event ID and Message ID.
.
image

Notifcation Email received.

I hope helps.

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:

Bildschirmfoto 2021-04-22 um 07.48.27

You can’t access ${message.id} directly, you need to use inside loop foreach:

${foreach backlog message}
ID: ${message.id}
${end}

Hi @shoothub,

I tried it out, but still no message ID :confused:

My template:

Bildschirmfoto 2021-04-22 um 13.05.55

E-Mail:

Bildschirmfoto 2021-04-22 um 13.06.37

Check if you have enabled Message backlog and setup to 1

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