<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Nagiosplug-help] Questions using negate?</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Double checked to make sure, but check_ping does require both warning and</FONT>
<BR><FONT SIZE=2>critical settings, so omitting one is not possible. By setting them the</FONT>
<BR><FONT SIZE=2>same though, the check should produce only an OK state or a CRITICAL state,</FONT>
<BR><FONT SIZE=2>as any time the threshold for a WARNING is crossed, so is the threshold for</FONT>
<BR><FONT SIZE=2>the CRITICAL state.</FONT>
</P>
<P><FONT SIZE=2>As for other return codes, the new-negate is basically just changing any</FONT>
<BR><FONT SIZE=2>return code that is greater than 0 to 0 or any return code equal to 0 to 2. </FONT>
<BR><FONT SIZE=2>As I said, this does work off of the command line as it should, but when</FONT>
<BR><FONT SIZE=2>tested on both a reachable and non-reachable host in the Nagios application,</FONT>
<BR><FONT SIZE=2>they both register as an OK state no matter what the check_ping plugin</FONT>
<BR><FONT SIZE=2>reports.</FONT>
</P>
<P><FONT SIZE=2>Does Nagios just use return codes in determining an OK/CRITICAL state or is</FONT>
<BR><FONT SIZE=2>there something else it may be keying off of? Or, do plugins behave</FONT>
<BR><FONT SIZE=2>differently in Nagios than they do on the command line? Or does someone </FONT>
<BR><FONT SIZE=2>have a better answer as to why the negate plugin-wrapper won't work with </FONT>
<BR><FONT SIZE=2>check_ping?</FONT>
</P>
<P><FONT SIZE=2>Any continued help would be appreciated.</FONT>
</P>
<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: John Cockerham [<A HREF="mailto:jcockerham@mydoconline.com">mailto:jcockerham@mydoconline.com</A>]</FONT>
<BR><FONT SIZE=2>> Sent: Thursday, March 06, 2003 7:35 AM</FONT>
<BR><FONT SIZE=2>> To: Rose David</FONT>
<BR><FONT SIZE=2>> Subject: RE: [Nagiosplug-help] Questions using negate?</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Since you are using the same criteria to check for warning and critial</FONT>
<BR><FONT SIZE=2>> status, perhaps you can just omit one or the other.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Ex.home/nagios/libexec/new-negate</FONT>
<BR><FONT SIZE=2>> /home/nagios/libexec/check_ping -H yournode -c 1000.0,100%</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> In your case, the -p 5, is really not required, 5 is the default value</FONT>
<BR><FONT SIZE=2>> for this parameter and therefor does not need to be passed.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I beleive that if you only check for critical this will limit </FONT>
<BR><FONT SIZE=2>> the return</FONT>
<BR><FONT SIZE=2>> codes to ether 0 for success and 2 for critical. The new-negate script</FONT>
<BR><FONT SIZE=2>> will then invert these. The perl script. new-negate, will have to be</FONT>
<BR><FONT SIZE=2>> changed if you wish to perform checks on multiple return codes.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Good luck</FONT>
</P>
</BODY>
</HTML>