Highlighted
Acclaimed Contributor.
Acclaimed Contributor.
1160 views

Email notification

Jump to solution

Hi All,

When I create an email notification email body is shown entire correlate event details instead of what I need even I use velocity template.

Is it ESM 6.8 bug ?

Mr
Labels (2)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

This is my Email.vm

if($introspector.getDisplayValue($event,"flexString1")=="PUAMrule")

parse ("Informative_PUAM.vm")

##

elseif($introspector.getDisplayValue($event,"name")=="DDOS Alert")

parse ("ddos-alert.vm")

##

else

parse ("Informative2.vm")

##

#end

This is my Informative_PUAM.vm

=== Event Details For PUAM Activity ===

Event Start Time: $introspector.getDisplayValue($event,"startTime")

Event Name       : $introspector.getDisplayValue($event,"name")

Event Action     : $introspector.getDisplayValue($event,"deviceAction")

Event Details    : $introspector.getDisplayValue($event,"message")

Source User Name : $introspector.getDisplayValue($event,"sourceUserName")

...................................................

email notification only contains subject.

Cheers

Gayan

Mr

View solution in original post

0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Sounds like your velocity template is not working as intended. Can you post you VMs?

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

This is my Email.vm

if($introspector.getDisplayValue($event,"flexString1")=="PUAMrule")

parse ("Informative_PUAM.vm")

##

elseif($introspector.getDisplayValue($event,"name")=="DDOS Alert")

parse ("ddos-alert.vm")

##

else

parse ("Informative2.vm")

##

#end

This is my Informative_PUAM.vm

=== Event Details For PUAM Activity ===

Event Start Time: $introspector.getDisplayValue($event,"startTime")

Event Name       : $introspector.getDisplayValue($event,"name")

Event Action     : $introspector.getDisplayValue($event,"deviceAction")

Event Details    : $introspector.getDisplayValue($event,"message")

Source User Name : $introspector.getDisplayValue($event,"sourceUserName")

...................................................

email notification only contains subject.

Cheers

Gayan

Mr

View solution in original post

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Found the error.

Email.vm should be like below

#if($introspector.getDisplayValue($event,"flexString1")=="PUAMrule")

#parse ("Informative_PUAM.vm")

##

#elseif($introspector.getDisplayValue($event,"name")=="DDOS Alert")

#parse ("ddos-alert.vm")

##

#else

#parse ("Informative2.vm")

##

#end

Mr
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.