Transforms - Suppress Events by Location

From Zenoss Wiki
Revision as of 06:29, 24 November 2012 by Chet Luther (Talk | contribs)$7

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In any network with many sites connected by either VPN tunnels, MPLS or direct links you may find that the most common network failure is loss of connectivity to an entire site. In these cases a good approach to doing effective event suppression in Zenoss would be to create a single transform that contained a map of Zenoss locations to the primary gateway at each site.

This will allow the following transform to suppress all events from a site when the gateway goes down. It's important to not put the gateway device in the location or it's failure will also be suppressed.

    '/Austin, TX': '',
gateway_id = GATEWAY_MAP.get(getattr(evt, 'Location', ''))
if gateway_id:
    gateway = dmd.Devices.findDeviceByIdExact(gateway_id)
    if gateway and gateway.getStatus() > 0:
        evt.eventState = 2  # 2 == suppressed