Doug C
2013-02-28 21:18:16 UTC
Doug C [http://community.zenoss.org/people/thedukeness] created the discussion
"Event Transform -- help! so many emails..."
To view the discussion, visit: http://community.zenoss.org/message/72234#72234
--------------------------------------------------------------
I'm trying to use event transform to limit the notifications I receive. I have a couple sites where one of them has an unreliable VPN connection and the other one has power outage issues. When they start getting flakey I get buried in notifications. Here's what I've put in place by searching for documentation and tips. However while I don't get any errors from Zenoss, it doesn't seem to actually work. The duplicates still get through. Possibly because I'm using 4.2 and these syntax was from earlier Zenoss?
# When device is ping down, drop other alerts from same device
if getattr(evt, 'severity', 0) > 0 \
   and getattr(evt, 'eventClass', '/Unknown') != '/Status/Ping' \
   and device and device.getPingStatus() > 0:
   evt.eventState = 2
# If site1 gateway is ping down, drop alerts from site1 devices
if device and 'site1' in device.getLocationName() and device.id != 'gw-site1.example.com':
   gateway = device.findDevice('gw-site1.example.com')
   if gateway.getPingStatus() > 0:
       evt.eventState = 2
# If esxi1 host is ping down, drop alerts from esxi1 guests
if str(evt.DeviceGroups).find("esxi1")>=0 and device.id != 'esxi1-site1.example.com':
   vm_host = device.findDevice('esxi1-site1.example.com')
   if vm_host.getPingStatus() > 0:
       evt.eventState = 2
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/72234#72234]
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]
"Event Transform -- help! so many emails..."
To view the discussion, visit: http://community.zenoss.org/message/72234#72234
--------------------------------------------------------------
I'm trying to use event transform to limit the notifications I receive. I have a couple sites where one of them has an unreliable VPN connection and the other one has power outage issues. When they start getting flakey I get buried in notifications. Here's what I've put in place by searching for documentation and tips. However while I don't get any errors from Zenoss, it doesn't seem to actually work. The duplicates still get through. Possibly because I'm using 4.2 and these syntax was from earlier Zenoss?
# When device is ping down, drop other alerts from same device
if getattr(evt, 'severity', 0) > 0 \
   and getattr(evt, 'eventClass', '/Unknown') != '/Status/Ping' \
   and device and device.getPingStatus() > 0:
   evt.eventState = 2
# If site1 gateway is ping down, drop alerts from site1 devices
if device and 'site1' in device.getLocationName() and device.id != 'gw-site1.example.com':
   gateway = device.findDevice('gw-site1.example.com')
   if gateway.getPingStatus() > 0:
       evt.eventState = 2
# If esxi1 host is ping down, drop alerts from esxi1 guests
if str(evt.DeviceGroups).find("esxi1")>=0 and device.id != 'esxi1-site1.example.com':
   vm_host = device.findDevice('esxi1-site1.example.com')
   if vm_host.getPingStatus() > 0:
       evt.eventState = 2
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/72234#72234]
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]