Email Notification Field Ordering

Hello, All

I’m trying to figure out how to order my fields in an email notification. I have looked at pretty much all forum posts and must have to be missing something.

Here is my field name, along with many more. But as an example.
Severity_Name
Computer_Name

Here is my Body Template:

Fields:
{foreach event.fields field} {field.key}: ${field.value}

{message.fields.Severity_Name} {message.fields.Computer_Name)
${end}

I’m not seeing these added fields coming over into the notification email or even being duplicated, as they are in the email body already, just not in the order that I would like them in.

Thanks in advanced,

You can’t cycle through event object, if you want to use message fields, but backlog. Use this:

${foreach backlog message} ${message.fields.Severity_Name} ${message.fields.Computer_Name} ${end}

You can also use same technique in message subject, for example I use this:
User ${foreach backlog message}${message.fields.username}${end} connected to switch ${foreach backlog message}${message.source}${end} from IP ${foreach backlog message}${message.fields.src_ip}${end}

PS: You have to setup number of backlog to 1: in Alerts - Event Definitions - tab Notifications and field Message Backlog , tick the checkbox and set 1.
Message backlog define number of messages to be included in Notifications.

Hello Shoothub,

Thanks for helping, I was able to get it working as we needed with your help.

Take Care,

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