Optimize 7.1.2 Dynamic Templates for Email and SNMP Alerts

Hello,

I was wondering if anyone has tried out dynamic template definitions that use the velocity templating framework?

Currently we send out SNMP and SMTP alerts. However we would like
to tailor some of the alerts based on which rule triggered. If I understand the documentation correctly I should be able to use dynamic templates for this.

I.e. SNMP Alerts in some cases should be something like

${Rule.Name}
${Rule.DateTime}
${Rule.Desciption}
${Rule.Rule.URL}

SMTP Alerts will mostly be as they are out of the box
except for the {Data} and / or {Diagnosis.Attributes} field which
for some of the rules contain in our case > 200 rows.

Now using the velocity engine one can do something like

#foreach ($event in $context.getEvents().get($mapName))
 #if ${Data.size() >= 25)
       Truncated the list
#else 
       Associated Text:
#foreach ($dim in $Data)
      $Data
.
.
.And so on

Am I going in the correct direction here?

My main struggle is to find a “neat” way for me to trigger the correct template variation. Sometimes we do want the big list, but some users
only want to know “What failed, when, description stating corrective action” others want the whole deal.

So anyone done anything similar?

Regards
Thor I.

Hi Thor

are you able to send SNMP alerts via your OFI 7.1.2 ? I’m having some issues whith the snmp Alert Settings and my alerts are not being sent.

here attached, the errors I have.

Any help would be appreciated.

many thanks

José
OFI_712_SNMPAlertSettings_error.txt (15.7 KB)