Discussion:
Tails Severity Name
steve stoltz
2013-07-09 17:38:25 UTC
Permalink
steve stoltz [http://community.zenoss.org/people/sstoltz] created the discussion

"Tails Severity Name"

To view the discussion, visit: http://community.zenoss.org/message/73884#73884

--------------------------------------------------------------
I have been trying to get the Tails severity name for Zenoss 4.*

I can get the numerical value with ${env/severity} but in my email notifications I would like to see the bold text of Error or Warning.

Is there a way to transform or retrieve the event severity name in the email notifications.

Thanks.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73884#73884]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
hydruid
2013-07-09 20:14:11 UTC
Permalink
hydruid [http://community.zenoss.org/people/hydruid] created the discussion

"Re: Tails Severity Name"

To view the discussion, visit: http://community.zenoss.org/message/73889#73889

--------------------------------------------------------------
The easiest way to do that would be to create a trigger and notification for each type of email notification you want. Then modify the notification to have the bold text you want.

Examples:
triggerA (Severity=Error) -> notificationA (Body of email has <b>Error</b>)
triggerB (Severity=Warning) -> notificationB (Body of email has <b>Warning</b>)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73889#73889]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Rob Eagle
2013-07-09 20:16:05 UTC
Permalink
Rob Eagle [http://community.zenoss.org/people/reagle] created the discussion

"Re: Tails Severity Name"

To view the discussion, visit: http://community.zenoss.org/message/73890#73890

--------------------------------------------------------------
Steve,
You could probably do something like this in the transform (maybe even at the root event class if you want this on all events - "WOULD TEST FIRST") and create a unique event attribute that can be used in the event notification.
Transform example:
severityList = {0:'Clear', 1:'Debug', 2:'Info', 3:'Warning', 4:'Error', 5:'Critical'}
if evt.severity in severityList:
    evt.mySummaryTransformed = severityList[evt.severity]
else:
    evt.mySummaryTransformed = evt.severity

Then in the notification use the {$evt/mySummaryTransformed } variable.
If this doesn't work, i can pass along the notification command i use to send events and you can do this in the notification command instead.
--Rob
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73890#73890]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
James M
2013-07-10 14:55:05 UTC
Permalink
James M [http://community.zenoss.org/people/James] created the discussion

"Re: Tails Severity Name"

To view the discussion, visit: http://community.zenoss.org/message/73908#73908

--------------------------------------------------------------
Hey http://community.zenoss.org/people/sstoltz steve stoltz

I don't thing any transforms required,
Try to use *${evt/severityString}*
Instead of: *${env/severity}*
In the notification's content settings

If you want it bold (in the body format) just add the html tag: <b> ${evt/severityString} </b>

Hope that helps :)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73908#73908]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...