jcurry
2012-12-13 14:22:46 UTC
jcurry [http://community.zenoss.org/people/jcurry] created the discussion
"Transform to change device"
To view the discussion, visit: http://community.zenoss.org/message/70533#70533
--------------------------------------------------------------
Core 4.2 Fixpack 1.
Scenario is that I want to change the device field in a transform as events are reported by a firewall but the device that REALLY has issues is behind that firewall. The summary includes the device name that I want the event to come from.
So, transform is:
#get new device name from summary - 4th space-separated field (starting at 0)
h=evt.summary.split()[3]
evt.reportingHost = evt.device
evt.device = h
Transform works to the extent that the device field is changed but in the Event Console the field under Resource has the correct name but does not appear as a link (the device is correct and normal events from this device do appear as a link).
In addition, there is no device context fields - Location, deviceClass, Systems, etc...
Looking at the trace in zeneventd.log I can see that it notices that the device has changed and the UpdateDeviceContextAndTags method is called - but this only clears the device context fields - it does not "reident" them. My assumption was that the TransformAndReidentPipe ought to redo the AddDeviceContextAndTagsPipe but it does not appear to be doing that.
Is my assumption about reident correct - and it isn't working?
Or is this a bad assumption?
Any other bright ideas for changing the device (and all its associated device context) in a 4.2 transform??
Cheers,
Jane
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/70533#70533]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
"Transform to change device"
To view the discussion, visit: http://community.zenoss.org/message/70533#70533
--------------------------------------------------------------
Core 4.2 Fixpack 1.
Scenario is that I want to change the device field in a transform as events are reported by a firewall but the device that REALLY has issues is behind that firewall. The summary includes the device name that I want the event to come from.
So, transform is:
#get new device name from summary - 4th space-separated field (starting at 0)
h=evt.summary.split()[3]
evt.reportingHost = evt.device
evt.device = h
Transform works to the extent that the device field is changed but in the Event Console the field under Resource has the correct name but does not appear as a link (the device is correct and normal events from this device do appear as a link).
In addition, there is no device context fields - Location, deviceClass, Systems, etc...
Looking at the trace in zeneventd.log I can see that it notices that the device has changed and the UpdateDeviceContextAndTags method is called - but this only clears the device context fields - it does not "reident" them. My assumption was that the TransformAndReidentPipe ought to redo the AddDeviceContextAndTagsPipe but it does not appear to be doing that.
Is my assumption about reident correct - and it isn't working?
Or is this a bad assumption?
Any other bright ideas for changing the device (and all its associated device context) in a 4.2 transform??
Cheers,
Jane
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/70533#70533]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]