Highlighted
ambreen1 Absent Member.
Absent Member.
746 views

custom notification not working fine.

Jump to solution

What i am missing in this. Blue part of Email.vm is working fine but red part is not working. It triggers the rule ESM receives notification but notification is not coming on my email address. Other rules are working fine a7 notifications are coming on same email destination. As soon i remove the red portion of email.vm. I start getting notification as Information.vm

## Email.vm is a Velocity macro file that serves as a template for the text

## sent for e-mail notifications.

## To change the text sent, edit the text below.

## The following fields are defined by default.

## The notification URL is automatically established by the ArcSight Web server

## host.

## The event URL links to the relevant event as viewed in ArcSight Web.


Notification ID: ${NOTIFICATION_ID}

Escalation Level: ${ESCALATION_LEVEL}

#if($introspector.getDisplayValue($event, "generatorName") == "Barracuda Warning Alert Rule")
#parse ("Custom Notifications for Rules/Barracuda_Rule.vm")   
    

#elseif($introspector.getDisplayValue($event, "generatorName") == "ESM Resource Failure Alert")
#parse ("Custom Notifications for Rules/ESM_Resources_Rule.vm")


#else

#parse ("Informative.vm")

#end

Acknowledge this message in one of these ways:


#if(${INCOMING_MAIL_SERVER_CONFIGURED})
* Reply to this e-mail. Include this message's notification ID in your reply.

#end
* Log in to ArcSight Web at ${NOTIFICATION_URL} and view the Notifications display.
* Log in to the ArcSight Console and click the Notification button on the tool bar.


To view the full alert, please go to ${EVENT_URL}.

===========

ESM_Resources_Rule.vm

==========

## This is a velocity macro file...
## The following fields are defined in the velocity macro.
## event == the event which needs to be sent.
## EVENT_URL == root of the event alert.
## NOTIFICATION_URL = root of the notification.
=== Event Details ===

Event Name: $introspector.getDisplayValue($event,"name")
Device Receipt Time:  $introspector.getDisplayValue($event,"deviceReceiptTime")
Manager Receipt Time: $introspector.getDisplayValue($event,"managerReceiptTime")
Device Host Name:  $introspector.getDisplayValue($event,"deviceHostName")
Device Event Category:   $introspector.getDisplayValue($event,"deviceEventCategory")
Device Zone Name:  $introspector.getDisplayValue($event,"deviceZoneName")
Source User ID:    $introspector.getDisplayValue($event,"sourceUserID")
File Name:     $introspector.getDisplayValue($event,"fileName")
File Path:     $introspector.getDisplayValue($event,"filePath")
File Type:     $introspector.getDisplayValue($event,"fileType")
File Creation Time:     $introspector.getDisplayValue($event,"fileCreationTime")
File ModificationTime:  $introspector.getDisplayValue($event,"fileModificationTime")
Configuration Resource: $introspector.getDisplayValue($event,"deviceCustomString2")

Regards,

Ambreen

Labels (3)
Tags (2)
0 Likes
Reply
1 Solution

Accepted Solutions
ambreen1 Absent Member.
Absent Member.

Re: custom notification not working fine.

Jump to solution

Denise,

Thanks for trying. I did it myself few months back.......:)  and this "elseif" is working perfectly fine for me.

#if($introspector.getDisplayValue($event, "generatorName") == "Barracuda Warning Alert Rule")

#parse ("Custom Notifications for Rules/Barracuda Rule.vm")

##

   #elseif($introspector.getDisplayValue($event, "generatorName") == "Connector Up" || $introspector.getDisplayValue($event, "generatorName") == "Connector Down")

##

   #parse ("Custom Notifications for Rules/Connector Rule.vm")

##

#else

##

     #parse ("Informative.vm")

##

#end

0 Likes
Reply
2 Replies
DeniseSwilley Super Contributor.
Super Contributor.

Re: custom notification not working fine.

Jump to solution

try it this way and see if it works... I have never had much success with the elseif.

#if($introspector.getDisplayValue($event, "generatorName") == "Barracuda Warning Alert Rule")
#parse ("Custom Notifications for Rules/Barracuda_Rule.vm") 

#end

#if($introspector.getDisplayValue($event, "generatorName") == "ESM Resource Failure Alert")
#parse ("Custom Notifications for Rules/ESM_Resources_Rule.vm")

#end


#else

#parse ("Informative.vm")

#end

#end


0 Likes
Reply
ambreen1 Absent Member.
Absent Member.

Re: custom notification not working fine.

Jump to solution

Denise,

Thanks for trying. I did it myself few months back.......:)  and this "elseif" is working perfectly fine for me.

#if($introspector.getDisplayValue($event, "generatorName") == "Barracuda Warning Alert Rule")

#parse ("Custom Notifications for Rules/Barracuda Rule.vm")

##

   #elseif($introspector.getDisplayValue($event, "generatorName") == "Connector Up" || $introspector.getDisplayValue($event, "generatorName") == "Connector Down")

##

   #parse ("Custom Notifications for Rules/Connector Rule.vm")

##

#else

##

     #parse ("Informative.vm")

##

#end

0 Likes
Reply
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.