TECHZEN Zenoss User Community ARCHIVE  

Can I add the trigger to the notification body?

Subject: Can I add the trigger to the notification body?
Author: Joan
Posted: 2017-08-04 06:57

I have a notification that is launched by several different triggers

Device: ${evt/device/title} ${evt/device}
Component: ${evt/component}
Severity: ${evt/severity}
Time: ${evt/lastTime}
Class: ${evt/DeviceClass}
Message:
${evt/message}
<a href="${urls/eventUrl}">Event Detail</a>
<a href="${urls/ackUrl}">Acknowledge</a>
<a href="${urls/closeUrl}">Close</a>
<a href="${urls/eventsUrl}">Device Events</a>
I would like to add a note on the trigger that provoked this message, but I don't see any variable with this information on the list here

Can I get that info somehow?


Subject: RE: Can I add the trigger to the notification body?
Author: Joan
Posted: 2017-08-04 07:00

The subject is not properly worded, it should be "Can I add the trigger name to the notification message?"

Subject: RE: Can I add the trigger to the notification body?
Author: Jane Curry
Posted: 2017-08-04 09:27

There definitely isn't an easy way to do this!  The standard Notification only has access to attributes of the event which has no concept of the trigger in which it might be used.  It is a combination of zeneventserverd and the signal Rabbit queue that then applies the trigger logic and zenactiond that takes the output of that signal queue and tests whether Notifications are required and implements them.

That said - it's an obvious thing to want to do!  Don't know if we could write a ZenPack with a new Notification type that DOES grab the enacting trigger?  If you turn up logging for zenactiond it does report on the trigger that caused the Notification so it has to be accessible somehow.

Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------


Subject: RE: Can I add the trigger to the notification body?
Author: Joan
Posted: 2017-08-07 02:22

I suppose that this will be enough for now then. I assume that I made the proper change to the notifications, but if it starts alerting on wrong times I'll enable the debug.
Thanks a lot Jane


Subject: RE: Can I add the trigger to the notification body?
Author: Jane Curry
Posted: 2017-08-07 06:07

What exact version are you on, Joan?  I have a vague memory of a bug somewhere along the line with regard to Notification times.

Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------


< Previous
Collecting String data from SNMP during performance cycle?
  Next
Latest Linux Monitor ZenPack (2.2.5) breaks Windows Filesystem Transform
>