Archived community.zenoss.org | full text search
Skip navigation
5828 Views 4 Replies Latest reply: Mar 19, 2009 4:28 PM by lgbarker RSS
daviz00 ZenossMaster 80 posts since
Jan 23, 2008
Currently Being Moderated

Jun 3, 2008 9:38 AM

Setting Component from COMMAND DataSource using nagios plug.

I have a custom zenpack which creates components from Pillar SAN Filesystems.

I'm trying to threshold these components using a nagios plugin to handle string data.

My plugin takes string values and returns 1 or 0 for pass/fail to threshold on.

So I have a COMMAND DataSource bound to the components template. It calls my nagios style plugin while specifying the components snmpindex.

$$ZENHOME/Products/PillarMonitor/libexec/check_pillar_filesystem.py -H ${dev/manageIp} -c ${dev/zSnmpCommunity} -i ${here/snmpindex}

My problem is during my failure testing the Event Component is not set to the current component being thresholded so the dedupe rules fail to create separate events for each component that fails.

So I have three components each Pillar Filesystems

1: TestFS
2: DevFS
3: ProdFS

I hardcode my nagiosplugin to return 0 for one datapoint indicating a failure. Since it is ran for each component I should get 3 separate events.

Except I get one event in the console with three counts and the summary is simply the last components name.

pilot1 ProdFS threshold of FilesystemHealth not met: current value 0.00

So the components DevFS and TestFS had the same blank component set and were not deduped properly.

I attempted to be clever and inside the COMMAND Datasource where the component is defined I placed the value ${here/id}

That value was taken literally and I still got 3 counts and 1 event. So I'm curious if I'm missing something here? I think the Component field in the COMMAND Datasource is missing TALES evaluation.
  • cgriebel Rank: Green Belt 175 posts since
    Nov 29, 2007
    I was seeing this same problem with the VMware ESX zenpack. /Perf/Filesystem threshold exceeded was generating events with blank components so all events were stacking up under one event and I couldn't tell which filesystem was filling. See here for reference:
    http://forums.zenoss.com/viewtopic.php?t=8063

    I made the changes you suggested to zencommand.py, restart zencommand and, voilà, the events are now working!

    Thanks!!
  • lgbarker Rank: White Belt 12 posts since
    Feb 11, 2009
    Thank you very much.
    Adding this "me too" so a forum search can find this post.

    This also works to fix same problem in the ZenPack for AIX.
    Events and alerts for filesystem thresholds did not include the mount point.

    Code in zencommand.py is a bit different in my install (Zenoss 2.2.4) but the fix can easily be made to fit.

    Search for self.thresholds.check in zencommand.py to find the code block.
    For reference, see http://forums.zenoss.com/viewtopic.php?t=8870

More Like This

  • Retrieving data ...