[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nagiosplug-help
Subject:    Re: [Nagiosplug-help] running check_snmp from CLI works but nagios
From:       "Gothard, Morgan" <Morgan.Gothard () SUG ! com>
Date:       2011-03-15 17:26:15
Message-ID: 472C1D62B701124B877E32E5C6CFE8CB82556500DE () SUHOU-EXCMSA1P ! energy ! sug ! pri
[Download RAW message or body]

Generally, if you are receiving the "out of bounds" message the path to your plugin \
is bad, in this case $USER1$/check_snmp.  Try using the absolute path of \
/usr/local/nagios/libexec/check_snmp and run again.  If it works, you haven't defined \
USER1 properly in your resource.cfg file.


-----Original Message-----
From: Shekhar Basnet [mailto:shekhar@mercantile.com.np] 
Sent: Monday, March 14, 2011 6:01 AM
To: nagiosplug-help@lists.sourceforge.net
Subject: [Nagiosplug-help] running check_snmp from CLI works but nagios web shows \
return code of 127 out of bounds

Hi all,

I am trying to monitor Cisco router 5 minutes CPU usage via check_snmp plugin.

I have this in commands.cfg

# 'check_snmp_cpu' command definition
define command{
        command_name    check_snmp_cpu
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -o 1.3.6.1.4.1.9.2.1.58.0 \
-w 80 -c 90 -l CPU -u% -d iso.3.6.1.4.1.9.2.1.58.0 -C $ARG1$

running as user nagios

%id
uid=181(nagios) gid=181(nagios) groups=181(nagios)
%
%/usr/local/nagios/libexec/check_snmp -H my-router -o 1.3.6.1.4.1.9.2.1.58.0 -w 80 -c \
90 -l CPU -u% -d iso.3.6.1.4.1.9.2.1.58.0 -C community CPU OK - 30 % | =30 
%
%

running without the other flags

%/usr/local/nagios/libexec/check_snmp -H my-router -o 1.3.6.1.4.1.9.2.1.58.0 -w 80 -c \
90 -C community SNMP OK - 30 | iso.3.6.1.4.1.9.2.1.58.0=30 
%

running with the -v flag

%/usr/local/nagios/libexec/check_snmp -H my-router -o 1.3.6.1.4.1.9.2.1.58.0 -w 80 -c \
                90 -C community -v
/usr/local/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv] my-router:161 \
1.3.6.1.4.1.9.2.1.58.0 iso.3.6.1.4.1.9.2.1.58.0 = INTEGER: 30
SNMP OK - 30 | iso.3.6.1.4.1.9.2.1.58.0=30 
%


But in the nagios web site the status is always CRITICAL and the STATUS INFORMATION \
is always (Return code of 127 is out of bounds - plugin may be missing). What does \
this mean? In the hosts.cfg file i have this:-

define service{
        use                     generic-service
        host_name               my-router
        service_description     CPU 5min
        check_period            24x7
        max_check_attempts      4
        normal_check_interval   5
        retry_check_interval    1
        contact_groups          nagadmin
        servicegroups           CPU-USAGE
        notification_interval   60
        check_command           check_snmp_cpu!community

i can't figure out what is wrong. Net-SNMP is installed. I am using FreeBSD. can \
somebody pls help?

%uname -imprsv
FreeBSD 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007     \
root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386 i386 GENERIC %

NAGIOS version 3.2.1

Tia

Sb




Private and confidential as detailed here: \
http://www.sug.com/disclaimers/default.htm#Mail . If you cannot access the link, \
please e-mail sender.

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> > > Please include plugins version (-v) and OS when reporting any issue. 
> > > Messages without supporting info will risk being sent to /dev/null


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic