Thanks, but I cannot for the life of me figure the context out.
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"
I'm kind of asking for a handhold here, so that I can get my head around
the callback setup. If I know one, then I should be able to figure the rest
out.
Thanks
On Thursday, January 19, 2017 at 4:11:02 PM UTC, Jochen Schalanda wrote:
>
> Hi Ciaran,
>
> I will simply quote from my reply on GitHub:
> https://github.com/Graylog2/graylog2-server/issues/3392#issuecomment-273806544
>
> There is no global message object but always a collection of messages
> which you have to iterate over (like shown on the bottom of the template
> and described in
> http://docs.graylog.org/en/2.1/pages/streams/alerts.html#email-alert-callback
> ).
>
> Cheers,
> Jochen
>
> On Thursday, 19 January 2017 17:05:31 UTC+1, Ciaran Boyle wrote:
>>
>> I am trying to get the source (server in this case) to show when I
>> receive an alert, but the alert has an empty field.
>>
>> The Call back details are below:
>>
>> ##########
>> Alert Description: ${check_result.resultDescription}
>> Date: ${check_result.triggeredAt}
>> Stream ID: ${stream.id}
>> Server: ${message.fields.source}
>> Stream title: ${stream.title}
>> Stream description: ${stream.description}
>> ${if stream_url}Stream URL: ${stream_url}${end}
>>
>> Triggered condition: ${check_result.triggeredCondition}
>> ##########
>>
>> ${if backlog}Last messages accounting for this alert:
>> ${foreach backlog message}${message}
>>
>> ${end}${else}<No backlog>
>> ${end}
>>
>> However the details in the alert when I do get the alert are below,
>> bearing in mind that this is a test
>>
>> ##########
>> Alert Description: Stream had 260 messages in the last 1 minutes with
>> trigger condition more than 1 messages. (Current grace time: 0 minutes)
>> Date: 2017-01-19T15:06:19.640Z
>> Stream ID: 5880d1f5913f7855c558daf9
>> Server:
>> Stream title: Test
>> Stream description: Test
>> Stream URL:
>> http://graylog/streams/5880d1f5913f7855c558daf9/messages?rangetype=absolute&from=2017-01-19T15:05:19.640Z&to=2017-01-19T15:06:19.640Z&q=*
>>
>> Triggered condition:
>> 6165c412-52e5-47cd-b160-a348f613980c:MESSAGE_COUNT={time: 1, threshold_type:
>> more, threshold: 1, grace: 0}, stream:={5880d1f5913f7855c558daf9:
>> "TestBiztalk"} ##########
>>
>> <No backlog>
>>
>> I would expect to see a server name where "Server: " but it's blank. Am I
>> using the correct variable?
>>
>> - Graylog Version: Graylog 2.0.3 (f07c170
>>
>> <https://github.com/Graylog2/graylog2-server/commit/f07c1703cda32d12108bc9f873f054fd192abc64>)
>>
>> on graylog (Oracle Corporation 1.8.0_77 on Linux 4.2.0-38-generic)
>> - Elasticsearch Version:
>> - MongoDB Version:
>> - Operating System: Ubuntu
>> - Browser version: Chrome
>>
>>
--
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/da564473-a379-4bf6-97c7-c1d8bac83f23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.