<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Looking at the config it seems that the community string reference in the pasted command definition (-c $ARG3$) will refer to the parameter "90" from the service definition, when the manual run shown implies "90" should be the critical value, not the community string. A possible fix would be adding "!public!" in the service definition and changing the community string call to "-c $ARG4$" in the command definition.</div><div><br></div><div><br></div><br><div><div>On Feb 10, 2013, at 2:48 PM, Ronald Prague <<a href="mailto:rprague@gmail.com">rprague@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><span style="color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">So I have an odd issue. Running <a href="http://check_snmp_mem.pl/">check_snmp_mem.pl</a> and <a href="http://check_snmp_load.pl/">check_snmp_load.pl</a> from Manbulon's check_snmp plugins is returning (null) and I can't figure out why.</span><br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">
<br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)"><span style="color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">(The firewall is an Astaro/Sophos UTM 320)</span><div>
I tried turning on debugging, this is the output:<br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">
<dl class="" style="margin:0px;padding:3px;border:1px solid rgb(201,210,216);font-size:13px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;line-height:18.1875px">
<dt style="margin:0px 0px 3px;padding:0px;text-transform:uppercase;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204,204,204);font-size:0.8em;font-weight:bold"><br></dt><dd style="margin:0px;padding:0px">
<code style="margin:2px 0px;padding:5px 0px 0px;overflow:auto;display:block;height:auto;max-height:200px;font-size:0.9em;font-family:Monaco,'Andale Mono','Courier New',Courier,mono;line-height:1.3em;color:rgb(46,139,87)">[1360352407.069695] [016.1] [pid=23937] HOST: clk_astaro, SERVICE: Firewall Load , CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: Yes, RETURN CODE: 2, OUTPUT: (null)</code></dd>
</dl><br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">
<br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)"><span style="color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">If I run the command by hand, it works fine, as the nagios user, I've also verified the nagios user has write access to /tmp just in case:</span><br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">
<dl class="" style="margin:0px;padding:3px;border:1px solid rgb(201,210,216);font-size:13px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;line-height:18.1875px">
<dt style="margin:0px 0px 3px;padding:0px;text-transform:uppercase;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204,204,204);font-size:0.8em;font-weight:bold"><br></dt><dd style="margin:0px;padding:0px">
<code style="margin:2px 0px;padding:5px 0px 0px;overflow:auto;display:block;height:auto;max-height:200px;font-size:0.9em;font-family:Monaco,'Andale Mono','Courier New',Courier,mono;line-height:1.3em;color:rgb(46,139,87)">nagios@monitor:/usr/local/nagios# /usr/local/nagios/libexec/<a href="http://check_snmp_load.pl/">check_snmp_load.pl</a> -H 192.168.0.2 -C public -T stand -w 25 -c 90<br style="margin:0px;padding:0px">
2 CPU, average load 5.0% < 25% : OK<br style="margin:0px;padding:0px"></code></dd></dl><br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">
<br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)"><span style="color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">Here's the command:</span><br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">
<dl class="" style="margin:0px;padding:3px;border:1px solid rgb(201,210,216);font-size:13px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;line-height:18.1875px">
<dt style="margin:0px 0px 3px;padding:0px;text-transform:uppercase;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204,204,204);font-size:0.8em;font-weight:bold"><br></dt><dd style="margin:0px;padding:0px">
<code style="margin:2px 0px;padding:5px 0px 0px;overflow:auto;display:block;height:auto;max-height:200px;font-size:0.9em;font-family:Monaco,'Andale Mono','Courier New',Courier,mono;line-height:1.3em;color:rgb(46,139,87)">define command{<br style="margin:0px;padding:0px">
command_name check_snmp_load_v1<br style="margin:0px;padding:0px"> command_line $USER1$/<a href="http://check_snmp_load.pl/">check_snmp_load.pl</a> -H $HOSTADDRESS$ $USER7$ -T $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$<br style="margin:0px;padding:0px">
}<br style="margin:0px;padding:0px"></code></dd></dl><br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">
<br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)"><span style="color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">And the service definition:</span><br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">
<dl class="" style="margin:0px;padding:3px;border:1px solid rgb(201,210,216);font-size:13px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;line-height:18.1875px">
<dt style="margin:0px 0px 3px;padding:0px;text-transform:uppercase;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204,204,204);font-size:0.8em;font-weight:bold"><br></dt><dd style="margin:0px;padding:0px">
<code style="margin:2px 0px;padding:5px 0px 0px;overflow:auto;display:block;height:auto;max-height:200px;font-size:0.9em;font-family:Monaco,'Andale Mono','Courier New',Courier,mono;line-height:1.3em;color:rgb(46,139,87)">define service{<br style="margin:0px;padding:0px">
use generic-service ; Inherit values from a template<br style="margin:0px;padding:0px"> host_name clk_astaro<br style="margin:0px;padding:0px"> service_description Firewall Load<br style="margin:0px;padding:0px">
check_command check_snmp_load_v1!stand!25!90<br style="margin:0px;padding:0px"> }<br style="margin:0px;padding:0px"></code></dd></dl><br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">
<br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)"><span style="color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">$USER1$ and $USER7$ are defined in resource.cfg:</span><br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">
<dl class="" style="margin:0px;padding:3px;border:1px solid rgb(201,210,216);font-size:13px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;line-height:18.1875px">
<dt style="margin:0px 0px 3px;padding:0px;text-transform:uppercase;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204,204,204);font-size:0.8em;font-weight:bold"><br></dt><dd style="margin:0px;padding:0px">
<code style="margin:2px 0px;padding:5px 0px 0px;overflow:auto;display:block;height:auto;max-height:200px;font-size:0.9em;font-family:Monaco,'Andale Mono','Courier New',Courier,mono;line-height:1.3em;color:rgb(46,139,87)">$USER1$=/usr/local/nagios/libexec<br style="margin:0px;padding:0px">
$USER7$=-C public<br style="margin:0px;padding:0px"></code></dd></dl><br style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">
The only changes to the plugin are for fixing the error for a version string, from this page: <a href="https://wiki.icinga.org/display/howtos/check_snmp">https://wiki.icinga.org/display/howtos/check_snmp</a></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div style=""><h4 id="checksnmp-Argumentv601isntnumericinnumericlt" style="padding:0px;margin:21px 0px 4px;color:rgb(68,68,68);font-family:Arial,Helvetica,FreeSans,sans-serif"><span style="font-weight:normal">Argument "v6.0.1" isn't numeric in numeric lt (<)</span></h4>
</div><div style=""><p style="line-height:17.328125px;color:rgb(68,68,68);padding:0px;margin-bottom:10px;font-family:Arial,Helvetica,FreeSans,sans-serif">This sources from old plugins getting a changed version string in libnet-snmp-perl. This can be fixed by replacing all occurences of the integer less than equal by the string compare 'lt'.</p>
</div><div style=""><div class="" style="padding: 0px; margin: 10px 20px; border: 1px solid rgb(153, 153, 153); overflow: auto; font-family: Arial, Helvetica, FreeSans, sans-serif; line-height: 17.328125px; "><div class="" style="margin:0px;padding:12px 10px">
<pre style="padding:0px;margin-top:0px;margin-bottom:0px;overflow:visible;font-family:'Courier New',Courier,monospace;line-height:1.3"># sed -i 's/Net::SNMP->VERSION < 4/Net::SNMP->VERSION lt 4/g' <a href="http://check_snmp_mem.pl/">check_snmp_mem.pl</a></pre>
</div></div></div></blockquote><div><span style="color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)"><br>
</span></div><div><span style="color:rgb(51,51,51);font-family:'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif;font-size:13px;line-height:18.1875px;background-color:rgb(225,235,242)">Any ideas? All of the other services/checks work fine.</span><br>
</div></div>
------------------------------------------------------------------------------<br>Free Next-Gen Firewall Hardware Offer<br>Buy your Sophos next-gen firewall before the end March 2013 <br>and get the hardware for free! Learn more.<br><a href="http://p.sf.net/sfu/sophos-d2d-feb_______________________________________________">http://p.sf.net/sfu/sophos-d2d-feb_______________________________________________</a><br>Nagios-users mailing list<br>Nagios-users@lists.sourceforge.net<br>https://lists.sourceforge.net/lists/listinfo/nagios-users<br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. <br>::: Messages without supporting info will risk being sent to /dev/null</blockquote></div><br></body></html>