Is that's possible to send url to an error or to stream in e-mail alert notifications on Graylog 4?

Description of your problem

I’m trying to set the e-mail Alert notifications with the URL of the error or the stream and it does not work.
I’m using Graylog 4.0.6

Description of steps you’ve taken to attempt to solve the issue

Created stream with the rules to receive an alert messages. Tried to add
${if backlog}Detail message hyperlink: ${foreach backlog msg}http://10.10.11.12:9000/messages/${msg.index}/${msg.id}
${end}${else} ${end}
for the error URL,seems like does not working.

I found on the forum that stream linking is not supported from 3.4.

I wounder if it’s possible to include URL of the Error or Stream in the alert message.

Operating system information

Windows Server

Hello

I have done what I believe your asking. Noted this is for Graylog version 4.0 and below. The newer GL version have HTML Body Template added to the notification template. If your using HTML that also has to be configured.

For an example here is my Notification Template /w out HTML

--- [Event Definition] ---------------------------
Title:       ${event_definition_title}
Description: ${event_definition_description}
Type:        ${event_definition_type}
--- [Event] --------------------------------------
Timestamp:            ${event.timestamp}
Message:              ${event.message}
Source:               ${event.source}
Priority:             ${event.priority}
Alert:                ${event.alert}
Timestamp Processing: ${event.timestamp}
Timerange Start:      ${event.timerange_start}
Timerange End:        ${event.timerange_end}
Stream URL:           ${event.stream_name}          
${if stream_url}Stream URL: ${stream_url}${end}

${if backlog}
--- [Backlog] ------------------------------------
Last messages accounting for this alert:
${foreach backlog message}
https://graylog-labs.com:9000/messages/${message.index}/${message.id}
User:             ${message.fields.TargetUserName}
WorkStation Name:  ${message.fields.WorkstationName}
Event Time:       ${message.fields.EventReceivedTime}
Source:           ${message.source}
Logon Type:       ${message.LogonType}
---[backlog end]---------------------------------
${end}
${end}

Email notification received.

image

Hope that helps

Thank you, it works.

1 Like

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