The way zencommand handles Nagios plugins is based on the exit code:
0 = Clear
2 = Configured severity + 1
Everything else = configured severity

So, if you have the command configured with the default severity of Warning,
then 17% should create a warning event.  If it goes up to 25% you will get
an Error event.  If it drops below 15% the event(s) will clear.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of elhannah
Sent: Wednesday, November 07, 2007 12:45 PM
To: [email protected]
Subject: [zenoss-users] honoring nagios rcode, or thresholds?

I have written plugins which are coded to the nagios plugin spec.
Specifically, I use return code 0 for OK, 1 for WARN, and 2 for CRITICAL.
When I define a datasource to call my plugin, the only option seems to be to
trigger an event or NOT trigger one... and this seems to hinge on a non-zero
return code vs. a zero return code respectively.

My example plugin:
/home/ehannah/zenoss/bin/scripts/zenossDisk -w 15 -c 25 --varname
ehannahRoot --filesystem /

As you can see, I specify a warning threshold, and a critical.  In my
example, I set 15 for warn, 25 for critical, knowing that the system I'm
looking at is 17%.   Therefore the script plugin returns the following line
of output:

Status WARNING;|ehannahRoot=17%;15%;25%;

In this case, 17% is high enough for warn, too low for critical... The
plugin returns exit code "1" in this case, "0" if it were OK, and "2" if it
were critical.

But, I only see non-event vs. event for the zenoss interpretation.  Is there
a way to honor the threshold defined by nagios plugins?




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=12888#12888

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to