Hi Ciaran,
On Thursday, 19 January 2017 17:26:23 UTC+1, Ciaran Boyle wrote:
>
> So this is obviously wrong - Server: ${message.fields.source}, I get
> that. Can you pose an example of how I would enter the "message.source"
>
As I described before, there is no single message object when the template
is being applied, but only a list of messages in the backlog variable.
So you have to iterate over the backlog list to get details for each
message included in that alert, for example:
##########
Alert Description: ${check_result.resultDescription}
Date: ${check_result.triggeredAt}
Stream ID: ${stream.id}
Stream title: ${stream.title}
Stream description: ${stream.description}
${if stream_url}Stream URL: ${stream_url}${end}
Triggered condition: ${check_result.triggeredCondition}
##########
${if backlog}
Servers:
${foreach backlog message}
* ${message.fields.source}
${end}
Last messages accounting for this alert:
${foreach backlog message}${message}
${end}${else}<No backlog>
${end}
You can find a description of the template engine
at
https://htmlpreview.github.io/?https://raw.githubusercontent.com/DJCordhose/jmte/master/doc/index.html
Cheers,
Jochen
--
You received this message because you are subscribed to the Google Groups
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/graylog2/93844918-282a-407b-888b-72947d9f4291%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.