Return code of 127 for check of service 'Total Processe

I am using nagios-3.0.3 and nagios-plugins-1.4.12

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Checking for circular paths between hosts…
Checking for circular host and service dependencies…
Checking global event handlers…
Checking obsessive compulsive processor commands…
Checking misc settings…

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

command.cfg

‘check_local_procs’ command definition

define command{
command_name check_local_procs
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
}

linuxhost.cfg

define service{
use generic-service
host_name linuxhost
service_description Total Processes
check_command check_nrpe!check_total_procs
}

ls -al check_procs

-rwxrwxr-x 1 nagios nagcmd 365072 Jul 7 16:04 check_procs
[root@nagios libexec]# pwd
/usr/local/nagios/libexec

But i am getting the following errors :

Jul 8 20:10:46 nagios nagios: Warning: Return code of 127 for check of service ‘Total Processes’ on host ‘linuxhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.

Please help me i am new to nagios.

Thanks

Hi

Is the ‘linuxhost’ server you checking the local nagios server or a remote server?

You define your command objects in command.cfg and reference them in the service check definitions. It appears you have defined a local service check called ‘check_local_procs’, but in your service you are using check_command check_nrpe!check_total_procs… check_nrpe is used to check processes on remote servers, not the local server, and you basically are telling check_nrpe that you want to run check_total_procs on that remote server and send the result back to nagios (and therefore you will need check_nrpe installed on both the nagios server and also the remote server to listen and respond to such requests, plus a copy of check_total_procs for nrpe to run on nagios’s behalf). If you are trying to run the check on the local server then you won’t need nrpe, but you must ensure the check_command is a defined command_name.

If this is a remote check, the error you are getting means that it can’t find check_total_procs on the remote machine, probably either missing or undefined in the nrpe configuration. I guess it’s kind of similar if you mean this to be a local check, I’d imagine nrpe is trying to connect to itself and still can’t find a check called check_total_procs in it’s own nrpe configuration, but you don’t need nrpe if this is the case, just define check_total_procs properly.

HTH

/S

Thanks for your reply.

In linuxhost.cfg is the remote server below is the entry of host

define host{
name linux-box10 ; Name of this template
use generic-host ; Inherit default values
check_period 24x7
check_interval 1
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period 24x7
notification_interval 30
notification_options d,r
contact_groups admins
register 0 ; DONT REGISTER THIS - ITS A TEMPLATE
}

define host{
use linux-box10 ; Inherit default values from a template
host_name linuxhost ; The name we’re giving to this server
alias linuxhost ; A longer name for the server
address 192.168.1.18 ; IP address of the server
}
On local server all the information are coming perfectly. But its creating problem with remote server. I have not install nrpe on the local server does it require ?

When i install NRPE on the main nagios system the problem is solved but some time it is showing below errors on some services like :
(Return code of 127 is out of bounds - plugin may be missing)
CHECK_NRPE: Error - Could not complete SSL handshake.
Jul 9 16:53:59 nagios nagios: Warning: The check of service ‘CPU Load’ on host ‘linuxhost’ looks like it was orphaned (results never came back). I’m scheduling an immediate check of the service…

At one moment it is showing me

OK Warning Critical
103 1 9

and at another moment after 8-10 sec. it is showing me

OK Warning Critical
60 1 51

And some time it`s showing correct value and some time above errors. Errors are above mention. What could be the reason it is changing in few mins.

Thanks