Thanks Giles,<div><br class="webkit-block-placeholder"></div><div>It worked. Thanks so much. I specified the community string in resource.cfg for $USER7$ and it worked.</div><div><br class="webkit-block-placeholder"></div>
<div>Regards,</div><div>Alex<br><br><div class="gmail_quote">On Tue, Mar 4, 2008 at 9:55 AM, Giles Coochey <<a href="mailto:gcoochey@sapphire.gi">gcoochey@sapphire.gi</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
What is $USER7$ macro? In your resource.conf?<br>
<br>
Likely to be the Community string, as that is what resource.conf is generally for.<br>
<br>
"check_snmp_mem.pl -H <a href="http://41.211.3.218" target="_blank">41.211.3.218</a> $USER7$ communitystring -w -I -c 80 98"<br>
<br>
Is what your command translates too, which wouldn't work.<br>
________________________________________<br>
From: <a href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net</a> [mailto:<a href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net</a>] On Behalf Of Alex Dehaini<br>

Sent: 04 March 2008 10:47<br>
To: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
Subject: [Nagios-users] check_snmp_mem.pl<br>
<div><div></div><div class="Wj3C7c"><br>
Hi Guys,<br>
<br>
I am having difficulties using this plugin. I can't get it to work. Can you guys help me please. What is syntax in the commands.cfg file and in the service file of the cisco router I intend to monitor. This is what I have<br>

<br>
commands.cfg<br>
<br>
define command{<br>
  command_name check_snmp_mem_v1<br>
  command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ $USER7$ $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$<br>
}<br>
<br>
In my service definition file<br>
<br>
define service{<br>
        use                             core-rservice<br>
        host_name                  core<br>
        service_description      Memory<br>
        check_command          check_snmp_mem_v1!communitystring!-I!80!98<br>
        }<br>
<br>
This is the result I get in nagios web cgi<br>
<br>
Memory<br>
<br>
<br>
<br>
<br>
CRITICAL<br>
03-04-2008 09:29:57<br>
0d 14h 2m 0s<br>
6/6<br>
(Return code of 127 is out of bounds - plugin may be missing)<br>
<br>
<br>
I reckon I am not doing something right because the plugin works from the command line i.e.<br>
<br>
snmp:/usr/local/nagios/libexec# ./check_snmp_mem.pl -H <a href="http://41.211.3.218" target="_blank">41.211.3.218</a> -C communitystring -I -w 40% -c 90%<br>
Processor:24%,I/O:60% : 28% :  > 40 ; WARNING <br>
<br>
What am I doing wrong?<br>
<br>
<br>
--<br>
Alex Dehaini<br>
Developer<br>
Site - <a href="http://www.alexdehaini.com" target="_blank">www.alexdehaini.com</a><br>
Email - <a href="mailto:alexdehaini@gmail.com">alexdehaini@gmail.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Alex Dehaini<br>Developer<br>Site - <a href="http://www.alexdehaini.com">www.alexdehaini.com</a><br>Email - <a href="mailto:alexdehaini@gmail.com">alexdehaini@gmail.com</a>
</div>