NRPE :- (Return code of 126 is out of bounds - plugin may be missing)

tom.welsh at bt.com tom.welsh at bt.com
Mon Sep 11 02:50:18 CEST 2006


I am having a problem getting NRPE and checks to work with Nagios

Nagios Version 2.5
Nagios Plugins 1.4.3
NRPE 2.5.2

I realise I have missed something,  but having looked at this now for
almost 2 hours and having ran through the faq and mailing lists I have
resorted to posting to the mailing list.

I believe NRPE is configured correctly and that my commands are working
fine as attested to below. However, when Nagios executes the NRPE checks
it fails the test and causes the following error to be displayed.

"(Return code of 126 is out of bounds - plugin may be missing) "

I know the files exist and that Nagios can see them

Nagios Monitoring host: usel

nagios at usel:~> ll /usr/local/nagios/libexec/check_nrpe
-rwxr-xr-x  1 Nagios nagios 56426 2006-09-07 15:48
/usr/local/nagios/libexec/check_nrpe

Nagios Monitored host h4oiap

nagios at h4oiap:/> ll /usr/local/nagios/libexec/check_disk
-rwxr-xr-x  1 root root 104473 2006-09-10 22:32
/usr/local/nagios/libexec/check_disk

nagios at h4oiap:/> ll /usr/local/sbin/nrpe
-rwxr-xr-x  1 nagios nagios 113380 2006-09-07 14:58 /usr/local/sbin/nrpe

I have external command checking configured in my nagios.cfg file and
Nagios is working fine doing the ping tests to remote machines. It also
behaves correctly allowing me to handle comments, re-schedule tests, add
scheduled down time so I know the permissions on the nagios.cmd file are
ok

nagios at usel:~> ll /usr/local/nagios/var/rw/nagios.cmd
prw-rw----  1 nagios nagcmd 0 2006-09-11 01:25
/usr/local/nagios/var/rw/nagios.cmd

I'm hoping someone will spot my mistake and says its nice and easy to
fix :)
But I am willing to take hard answers as well 


############################ START OFF CONFIGS
############################

>From checkcommand.cfg

define command{
        command_name    check_nrpe
        command_line    $USER1$ /check_nrpe -H $HOSTADDRESS$ -c $ARG1$
        }


>From services.cfg

# check number off users logged in
define service{
        use                             generic-service
        host_name                       h4oiap
        service_description             Logged In Users
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  vsu-p
        notification_interval           120
        notification_period             24x7
        notification_options            w,c,r
        check_command                   check_nrpe!check_users
        }


# Free Space on /
define service{
        use                             generic-service
        host_name                       h4oiap
        service_description             Free Disk Space /
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  vsu-p
        notification_interval           120
        notification_period             24x7
        notification_options            w,c,r
        check_command                   check_nrpe!check_disk1


>From nrpe.cfg on monitored host h4oiap

pid_file=/var/run/nrpe.pid
server_port=5666
nrpe_user=nagios
nrpe_group=nagios
dont_blame_nrpe=0
debug=1
command_timeout=60

# The following examples use hard coded command arguments...
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_disk1]=/usr/local/nagios/libexec/check_disk -e -l -X
iso9660 -X proc -x sysv -X tempfs -w 20% -c 10% -p /

############################ END OFF CONFIGS
############################



######## START OFF Commands executed on h4oiap monitored host
############

Running above commands locally on monitored host h4oiap produces the
following

CHECK DISK 

nagios at h4oiap:/usr/local/nagios/libexec>
/usr/local/nagios/libexec/check_disk -l -X iso9660 -X proc -x sysv -X
tempfs -w 20% -c 10% -p /
DISK OK - free space: / 3041 MB (27% inode=nan%);|
/=8222MB;9010;10136;-9223372036854775808;11263

CHECK USER

nagios at h4oiap:/usr/local/nagios/libexec>
/usr/local/nagios/libexec/check_users -w 5 -c 10
USERS OK - 1 users currently logged in |users=1;5;10;0

############ END OFF Commands executed on h4oiap monitored host
##############



###### START OFF Commands executed on USEL, The NAGIOS MONITORING  host
######

Running the above commands via check_nrpe from the MONITORING host usel
produces the following 

nagios at usel:~> /usr/local/nagios/libexec/check_nrpe -H 132.146.185.13 -p
5666 -c check_disk1
DISK OK - free space:| /=8222MB;9010;10136;-9223372036854775808;11263

Debug syslog output from h4oiap

Sep 11 00:57:51 h4oiap nrpe[6620]: Added
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
Sep 11 00:57:51 h4oiap nrpe[6620]: Added
command[check_disk1]=/usr/local/nagios/libexec/check_disk -e -l -X
iso9660 -X proc -x sysv -X tempfs -w 20% -c 10% -p /
Sep 11 00:57:51 h4oiap nrpe[6620]: INFO: SSL/TLS initialized. All
network traffic will be encrypted.
Sep 11 00:57:51 h4oiap nrpe[6620]: Handling the connection...
Sep 11 00:57:51 h4oiap nrpe[6620]: Host is asking for command
'check_disk1' to be run...
Sep 11 00:57:51 h4oiap nrpe[6620]: Running command:
/usr/local/nagios/libexec/check_disk -e -l -X iso9660 -X proc -x sysv -X
tempfs -w 20% -c 10% -p /
Sep 11 00:57:51 h4oiap nrpe[6620]: Command completed with return code 0
and output: DISK OK - free space:|
/=8222MB;9010;10136;-9223372036854775808;11263
Sep 11 00:57:51 h4oiap nrpe[6620]: Return Code: 0, Output: DISK OK -
free space:| /=8222MB;9010;10136;-9223372036854775808;11263


nagios at usel:~> /usr/local/nagios/libexec/check_nrpe -H 132.146.185.13 -p
5666 -c check_users
USERS OK - 1 users currently logged in |users=1;5;10;0

debug syslog output from h4oiap
Sep 11 00:59:25 h4oiap nrpe[6661]: Added
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
Sep 11 00:59:25 h4oiap nrpe[6661]: Added
command[check_disk1]=/usr/local/nagios/libexec/check_disk -e -l -X
iso9660 -X proc -x sysv -X tempfs -w 20% -c 10% -p /
Sep 11 00:59:25 h4oiap nrpe[6661]: INFO: SSL/TLS initialized. All
network traffic will be encrypted.
Sep 11 00:59:25 h4oiap nrpe[6661]: Handling the connection...
Sep 11 00:59:25 h4oiap nrpe[6661]: Host is asking for command
'check_users' to be run...
Sep 11 00:59:25 h4oiap nrpe[6661]: Running command:
/usr/local/nagios/libexec/check_users -w 5 -c 10
Sep 11 00:59:25 h4oiap nrpe[6661]: Command completed with return code 0
and output: USERS OK - 1 users currently logged in |users=1;5;10;0
Sep 11 00:59:25 h4oiap nrpe[6661]: Return Code: 0, Output: USERS OK - 1
users currently logged in |users=1;5;10;0

####### END OFF Commands executed on USEL, The NAGIOS MONITORING  host
#######



################ OUTPUT from /usr/local/nagios/var/nagios.log
################ 

[1157934304] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;h4oiap;Free
Disk Space                                              /;1157934301
[1157934312] Warning: Return code of 126 for check of service 'Free Disk
Space /                                             ' on host 'h4oiap'
was out of bounds. Make sure the plugin you're trying to run
actually exists.
[1157934492] Warning: Return code of 126 for check of service 'Logged In
Users'                                              on host 'h4oiap' was
out of bounds. Make sure the plugin you're trying to run ac
tually exists.
[1157934612] Warning: Return code of 126 for check of service 'Free Disk
Space /                                             ' on host 'h4oiap'
was out of bounds. Make sure the plugin you're trying to run
actually exists.

################ OUTPUT from /usr/local/nagios/var/nagios.log
################ 


Thanks in advance for your help

Tom Welsh

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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