Adding source message to Notification

I am attempting to create an email notification for an event that GrayLog is capturing. I am strugging to add details about the specific event that is being encountered. For example, if I include ${source.message} field, it doesn’t display the source message of the alert. How did I configure these notifications to include the source variables?

You need to setup Alerts - Event Definitions - Edit - tab Notifications and tick checkbox below Message Backlog and input 1. It is a number of messages to be included in Notifications. This way you can use fields in interation using foreach for example:

${if backlog}
${foreach backlog message}
    ${message.message}
${end}
${end}

If you want to use own extracted fields use syntax:
${message.fields.username}

and so on.

1 Like

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