Transforms - Suppress Events by Custom Property
From Zenoss Wiki
This is the approved revision of this page, as well as being the most recent.
One common scenario where event suppression is useful is where you have many devices on the other side of VPN tunnels or point-to-point WAN or MPLS connections. A way to address this is to add a custom property that allows you to set another device that each device depends on. See the following approach.
- Create a custom property at /Devices called cVPNGateway.
- Set the value for this cVPNGateway to “vpn1.example.com” on a device on the other side of vpn1.example.com.
- Create the following event transform for the root (/Events) event class.
if device and device.cVPNGateway and evt.severity in (4, 5): gateway = dmd.Devices.findDeviceByIdExact(device.cVPNGateway) if gateway and gateway.getStatus > 0: evt.eventState = 2 # 2 == suppressed
This will suppress any events for devices with their cVPNGateway property set to vpn1.example.com if vpn1.example.com is down.