Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

Generate an event for unmounted filesystems

VERSION 1 
Created on: Sep 14, 2009 11:21 AM by Noel Brockett - Last Modified:  Sep 14, 2009 11:21 AM by Noel Brockett

When a filesystem gets unmounted you can get an event generated.

 

Okay this was a problem I faced.
I needed to know when a filesystem gets unmounted or not mounted after a reboot.

 

Zenoss generates an event for failing OID collections.
But once you have a lot of devices it gets messy because you will get a lot of failing OID events.

 

Now, here is a way to filter only the failing OID's of filesystems (which means the filesystem is not mounted)
And we will create the event more human readable instead of 'failed to collect OID'

 

This is possible using an event mapping.
Did you ever used an event mapping before?

 

Okay let's hit it.

 

navigate to the web interface to: Classes => Events > Perf > snmp
Now click on the breadcrumb and choose  More  > Transform

 

http://YOUR-ZENOSS:8080/zport/dmd/Events/Perf/Snmp/editEventClassTransform


This brings you to a event transform rule. It is will be called when an event comes in for /Perf/Snmp.

 

And this is the eventclass where the failing OID collection comes in.

 

Now add this to the rule box:

 

if evt.summary.find(".1.3.6.1.2.1.25.2.3.1") > -1:
   evt.severity = 5
   evt.summary = "Filesystem is not mounted"
else:
   evt._action = 'drop'

 

Now as you can see there is an else statement.

 

In this case it means, if its not a filesystem please drop de event.

 

Ofcourse if you don't want that you can cut that away.

Comments (0)