Transforms - Print Device Title in Event Notification

From Zenoss Wiki
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search

One option would be to add a transform (likely at the root for events) that does something like this:

if device: evt.device = device.titleOrId()

This will set evt.device to the devices title if one is present. You wouldn't need to change anything in the notifications as this would change the evt.device to be the title where title is set (if a title isn't set the title field is the device id which is what you are renaming when you select the "rename" option which is giving you troubles). To implement this go to Events > Event Classes and click on the action wheel (gear icon) at the bottom left and select Transform. Here at the line above and all of your events will prefer the device title where set.