NRPE help - Return code 127

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
tgrtjake
Posts: 20
Joined: Thu Sep 25, 2014 10:35 am

NRPE help - Return code 127

Post by tgrtjake »

I have Nagios 4.0.8 running on Ubuntu 14.04 and am trying to monitor more than just ping on a remote Ubuntu 14.04 host. Any help?

I am getting the following error from the webpage:
Return code of 127 is out of bounds - plugin may be missing
nagios owns the plugin:
-rwxr-xr-x 1 nagios nagios 22992 Sep 25 15:03 check_nrpe
This is service defined in the cfg for the server being monitored:
define service{
use generic-service
host_name remotehost01
service_description Root Partition
check_command check_nrpe!check_root!
}
Here is check_nrpe defined in commands.cfg:
define command{
command_name check_nrpe
command_line $USER$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
Here is part of the /etc/nagios/nrpe.cfg on the remote host:
command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_root]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/remotehost01-root
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
And here is output when manually running the check from the nagios server:
root@NAGIOS01:/usr/local/nagios/etc/objects/ccc/servers# /usr/local/nagios/libexec/check_nrpe -H 172.16.x.x -c check_root
DISK OK - free space: / 24587 MB (89% inode=94%);| /=2781MB;23085;25971;0;28857
root@NAGIOS01:/usr/local/nagios/etc/objects/ccc/servers#
Nagios Core 4.1.1 running on Ubuntu 14.04
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRPE help - Return code 127

Post by tmcdonald »

What are the permissions of /usr/lib/nagios/plugins/check_disk on the remote host?
Former Nagios employee
tgrtjake
Posts: 20
Joined: Thu Sep 25, 2014 10:35 am

Re: NRPE help - Return code 127

Post by tgrtjake »

Everything in /usr/lib/nagios/plugins on remote host is root. Should it be nagios?
-rwxr-xr-x 1 root root 126016 Jul 5 2013 check_disk
Nagios Core 4.1.1 running on Ubuntu 14.04
tgrtjake
Posts: 20
Joined: Thu Sep 25, 2014 10:35 am

Re: NRPE help - Return code 127

Post by tgrtjake »

Bah, I see now what was wrong. The defined command had a typo.

Changed from:
define command{
command_name check_nrpe
command_line $USER$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
To:
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
Nagios Core 4.1.1 running on Ubuntu 14.04
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRPE help - Return code 127

Post by tmcdonald »

Ooooh, subtle. I always hate stuff like that. But hey, glad to see it's working. Gonna lock this up now.
Former Nagios employee
Locked