Ok, so the following transform is supposed to be added to the root of the
Events organizer. It should trigger on each event and only actually run
through if the device name is BP01LONv001. It should check if the device is
pingable and if not it should clear any event for that device that is listed in
active events (unless the event has an event summary of 'Device Reboot' or an
event summary that contains 'is down'). There must be some sort of syntax
error that I'm not seeing or something, because when I paste it in to Zenoss
the text turns red indicating some type of error:
import re
if device.id == 'BP01LONv001':
server = find(device.id)
if server.getPingStatus() > 0:
wherestr = "device = '%s'" % (evt.device)
for event in device.getEventManager().getEventList(where=wherestr):
if re.search("is down", event.summary):
string = 1
else:
string = 0
if event.summary != 'Device Reboot' and string == 0:
event.severity = 0
Any help would be greatly appreciated.
-------------------- m2f --------------------
Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=35126#35126
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users