TECHZEN Zenoss User Community ARCHIVE  

zenoss event dependancy when server down

Subject: zenoss event dependancy when server down
Author: [Not Specified]
Posted: 2014-12-04 04:56

Dear,

I would like to ask a little help with creating a transform that does the following:

Some of our servers have around 30 events generated when a server is not pingable, therefore I would like to supress all events except the event that says that the server is down.

Is there anybody that have something like this

I found http://wiki.zenoss.org/Transforms_Tip:_Dependencies but I am unable to create my own unfortunately.

EDIT: Also found something else: http://community.zenoss.org/thread/19826

Thanks in advance,

tZ0r



Subject: zenoss event dependancy when server down
Author: [Not Specified]
Posted: 2014-12-04 13:28

tZOr,
This seems to work. If the device is down and eventClass is with /Status/Ping (or Doesn't exist) , then remark severity of event to debug (or could add something like evt._action = "drop" to just drop the event).

if device:
server = dmd.Devices.findDeviceByIdExact(device.id)
if server.getPingStatus() > 0 and getattr(evt, 'eventClass', '/Status/Ping') != '/Status/Ping':
evt.severity = 1

--Rob




Subject: Rob,
Author: [Not Specified]
Posted: 2014-12-08 01:01

Rob,

Thats awesome! Thanks, Ill have a look.



< Previous
transform not working to drop events
  Next
zenoss event dependancy when server down
>