check_snmp_mem.pl
Marc Powell
marc at ena.com
Tue Mar 4 14:34:10 CET 2008
On Mar 4, 2008, at 3:46 AM, Alex Dehaini wrote:
> Hi Guys,
>
> 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
>
> commands.cfg
>
> define command{
> command_name check_snmp_mem_v1
> command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ $USER7$
> $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
> }
>
> In my service definition file
>
> define service{
> use core-rservice
> host_name core
> service_description Memory
> check_command check_snmp_mem_v1!communitystring!-I!
> 80!98
> }
>
> This is the result I get in nagios web cgi
>
> Memory
> CRITICAL
> 03-04-2008 09:29:57
> 0d 14h 2m 0s
> 6/6
> (Return code of 127 is out of bounds - plugin may be missing)
return code 127 means the plugin doesn't exist. There are 3
possibilities in your case --
- $USER1$ isn't set to /usr/local/nagios/libexec in resource.cfg
- resource.cfg isn't included in nagios.cfg as a resource_file
- check_snmp_mem.pl relies on an external program whose path isn't
fully qualified within the script.
>
>
> I reckon I am not doing something right because the plugin works
> from the command line i.e.
>
> snmp:/usr/local/nagios/libexec# ./check_snmp_mem.pl -H 41.211.3.218 -
> C communitystring -I -w 40% -c 90%
> Processor:24%,I/O:60% : 28% : > 40 ; WARNING
>
this is not what you're telling nagios to run in a number of ways.
$USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ $USER7$ $ARG1$ -w $ARG2$ -c
$ARG3$ $ARG4$ yields --
/path/to/plugins/check_snmp_mem.pl -H <host_address> <some unknown
value> communitystring -w -I -c 80 98
Based on your service definition and test run, you probably want the
following for your command{} -
command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $ARG1$
$ARG2$ -w $ARG4$ -c $ARG4$
--
Marc
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list