HELP - NOTHING WORKS! - Return code of 127 is out of bounds


#1

Hi,

I just installed nagios. New installation with the newest release of both nagios, nagios-plugins-all, fruity. Fist time in 10 years so basically first time user/installer. I am running into problems with it finding or accessing the plugins. I can run them fine from the command line however nothing elese works, remote hosts and localhost all fail with the same error. The only place I could find where it asks for the plugins directory is in the nagios startup script, if it is supposed to be someplace else then I could not find it and perhaps that is the problem?

My Enviornmnet:
fedora 6
x86_64
Installation:
/usr/lib64/nagios/plugins (user:nagios, group:nagios)
/usr/lib64/nagios/cgi-bin (user:nagios, group:nagios)
/usr/share/nagios/html (user: apache, group: apache)
/etc/nagios/(config files) [user:nagios, group:nagios]
/etc/init.d/nagios (user:root, group:root)
/usr/sbin/nagios (user:nagios, group:nagios)

My /etc/init.d/nagios script shows this config:

prefix=/usr/lib64/nagios
exec_prefix=/usr/lib64/nagios
NagiosBin=/usr/sbin/nagios
NagiosCfgFile=/etc/nagios/nagios.cfg
NagiosStatusFile=/var/log/nagios/status.dat
NagiosTempFile=/var/log/nagios/nagios.tmp
NagiosRetentionFile=/var/log/nagios/retention.dat
NagiosCommandFile=/var/log/nagios/rw/nagios.cmd
NagiosVarDir=/var/log/nagios
NagiosRunFile=/var/run/nagios.pid
NagiosLockDir=/var/lock/subsys
NagiosLockFile=nagios
NagiosCGIDir=/usr/lib64/nagios/cgi-bin
NagiosUser=nagios
NagiosGroup=nagios

here is what nagios.log shows:
[1192047107] Warning: Return code of 127 for check of service ‘Current Load’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[1192047237] Warning: Return code of 127 for check of service ‘Total Processes’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[1192047247] Warning: Return code of 127 for check of service ‘Root Partition’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[1192047377] Warning: Return code of 127 for check of service ‘PING’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[1192047387] Warning: Return code of 127 for check of service ‘Current Users’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[1192047396] Caught SIGTERM, shutting down…
[1192047396] Successfully shutdown… (PID=21592)
[1192047396] Nagios 2.9 starting… (PID=21833)
[1192047396] LOG VERSION: 2.0
[1192047396] Finished daemonizing… (New PID=21834)
[1192047686] Warning: Return code of 127 for check of service ‘Current Load’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[1192047686] Warning: Attempting to execute the command “/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
[1192047686] Warning: Attempting to execute the command “/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
[1192047686] Warning: Attempting to execute the command “/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
[1192047686] Warning: Attempting to execute the command “/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
[1192047686] Warning: Attempting to execute the command “/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
[1192047686] Warning: Attempting to execute the command “/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
[1192047686] Warning: Attempting to execute the command “/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
[1192047686] Warning: Attempting to execute the command “/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
[1192047686] Warning: Attempting to execute the command “/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
[1192047686] Warning: Attempting to execute the command “/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
[1192047686] HOST ALERT: localhost;DOWN;HARD;10;(No output!)
[1192047686] HOST NOTIFICATION: nagios-admin;localhost;DOWN;host-notify-by-email;(No output!)
[1192047696] SERVICE ALERT: localhost;Current Load;CRITICAL;HARD;1;(Return code of 127 is out of bounds - plugin may be missing)
[1192047826] Warning: Return code of 127 for check of service ‘Root Partition’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[1192047826] SERVICE ALERT: localhost;Root Partition;CRITICAL;HARD;1;(Return code of 127 is out of bounds - plugin may be missing)
[1192047966] Warning: Return code of 127 for check of service ‘Current Users’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[1192047966] SERVICE ALERT: localhost;Current Users;CRITICAL;HARD;1;(Return code of 127 is out of bounds - plugin may be missing)

Please help me, is there somewhere else I should be looking for the config of the plugins/libexec directory to be? Any ideas?


#2

also, I have tried the following changes:
prefix=/usr/lib64
exec_prefix=/usr/lib64

prefix=/usr/lib64/nagios
exec_prefix=/usr/lib64/nagios/plugins


#3

amazing, not one suggestion from anyone on how to fix this. Anyway, I fixed it myself. If you are using fruity as your config front-end, make sure it can write the config files correctly, I had to make some ownership changes to get it working properly.

Thanks for nothing :slight_smile:


#4

Start by reading the nagios documentation, or keep relying on that gui.
“plugin may be missing” suggests the path to your plugins is incorrectly configured in your checkcommands.cfg


#5

I got this error once when I made a typo in my commands.cfg file (think some distributions calls this file checkcommands.cfg).

I think i wrote $USER$ instead of $USER1$

HP check temperature

define command{
command_name check_hp_temp
command_line $USER1$/check_hp_temp.sh -H $HOSTADDRESS$ -C public -w $ARG2$ -c $ARG1$
}