In nagios its showing 255 (Return code of 255 is out of bou

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.
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by vyasdevaguddi »

here is the output we are getting when running the commands

[root@nblnxora003d ~]# /usr/local/nagios/libexec/check_nrpe -H dclnxspl007a -c check_load
OK - load average: 0.00, 0.00, 0.00|load1=0.000;15.000;30.000;0; load5=0.000;10.000;25.000;0; load15=0.000;5.000;20.000;0;
[root@nblnxora003d ~]# /usr/local/nagios/libexec/check_nrpe -H dclnxspl007a check_tmp
NRPE v2.15
[root@nblnxora003d ~]# /usr/local/nagios/libexec/check_nrpe -H dclnxspl007a check_swap
NRPE v2.15
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by rkennedy »

Can you run su - nagios and then run those same commands?

It's either permissions, or something misconfigured in your configuration. If the above fails, then please send over the full output of ls -la /usr/local/nagios/libexec/check_nrpe and also all applicable service definitions for what's currently failing.
Former Nagios Employee
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by vyasdevaguddi »

Here is the o/p and i chekc configuration
[root@nblnxora003d ~]# su - nagios
[nagios@nblnxora003d ~]$ /usr/local/nagios/libexec/check_nrpe -H dclnxspl007a -c check_load
OK - load average: 0.00, 0.00, 0.00|load1=0.000;15.000;30.000;0; load5=0.000;10.000;25.000;0; load15=0.000;5.000;20.000;0;
[nagios@nblnxora003d ~]$ /usr/local/nagios/libexec/check_nrpe -H dclnxspl007a check_tmp
NRPE v2.15
[nagios@nblnxora003d ~]$ /usr/local/nagios/libexec/check_nrpe -H dclnxspl007a check_swap
NRPE v2.15
[nagios@nblnxora003d ~]$ ls -la /usr/local/nagios/libexec/check_nrpe
-rwxrwxr-x 1 nagios nagios 76785 Sep 10 2015 /usr/local/nagios/libexec/check_nrpe
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by rkennedy »

All looks fine here with permissions. Please post your command definition for check_nrpe for us to review.
Former Nagios Employee
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by vyasdevaguddi »

history |grep nrpe ?
# from which the check_nrpe client is being executed.
pid_file=/var/run/nrpe.pid
# Address that nrpe should bind to in case there are more than one interface
# and you do not want nrpe to bind on all interfaces.
nrpe_user=nagios
nrpe_group=nagios
dont_blame_nrpe=0
# all network sessions are connected. This causes the nrpe daemons to
# command arguments *AND* the dont_blame_nrpe directive in this
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by vyasdevaguddi »

# The following examples use hardcoded command arguments...

command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /,/var/,/usr,/opt,/home,/tmp'
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by vyasdevaguddi »

here are error messages i am geeting when i run this command on nagios server
/usr/local/nagios/libexec/check_nrpe -H dclnxspl007a -t 30 -c check_users -a '-w 5 -c 10'

Feb 24 10:53:02 dclnxspl007a nrpe[9059]: Client request was invalid, bailing out...
Feb 24 10:53:02 dclnxspl007a xinetd[8967]: EXIT: nrpe status=0 pid=9059 duration=0(sec)
Feb 24 10:53:13 dclnxspl007a xinetd[8967]: START: nrpe pid=9060 from=::ffff:10.160.80.116
Feb 24 10:53:13 dclnxspl007a nrpe[9060]: Error: Request contained command arguments!
Feb 24 10:53:13 dclnxspl007a nrpe[9060]: Client request was invalid, bailing out...
Feb 24 10:53:13 dclnxspl007a xinetd[8967]: EXIT: nrpe status=0 pid=9060 duration=0(sec)
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: In nagios its showing 255 (Return code of 255 is out of

Post by mcapra »

It looks as though the remote system's NRPE configuration isn't configured to accept arguments:

Code: Select all

Feb 24 10:53:13 dclnxspl007a nrpe[9060]: Error: Request contained command arguments!
It looks as though your latest nrpe.cfg has dont_blame_nrpe set to 0:

Code: Select all

history |grep nrpe ?
# from which the check_nrpe client is being executed.
pid_file=/var/run/nrpe.pid
# Address that nrpe should bind to in case there are more than one interface
# and you do not want nrpe to bind on all interfaces.
nrpe_user=nagios
nrpe_group=nagios
dont_blame_nrpe=0
# all network sessions are connected. This causes the nrpe daemons to
# command arguments *AND* the dont_blame_nrpe directive in this
Can you set this value back to 1, restart xinetd/nrpe, and see if you can pass arguments to NRPE?
Former Nagios employee
https://www.mcapra.com/
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Re: In nagios its showing 255 (Return code of 255 is out of

Post by vyasdevaguddi »

The issue is fixed and you can close the case
Locked