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

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

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

Postby vyasdevaguddi » Wed Feb 15, 2017 1:28 pm

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

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

Postby rkennedy » Wed Feb 15, 2017 2:38 pm

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.
rkennedy
 
Posts: 6562
Joined: Mon Oct 05, 2015 11:45 am

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

Postby vyasdevaguddi » Thu Feb 16, 2017 1:16 pm

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

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

Postby rkennedy » Thu Feb 16, 2017 2:18 pm

All looks fine here with permissions. Please post your command definition for check_nrpe for us to review.
rkennedy
 
Posts: 6562
Joined: Mon Oct 05, 2015 11:45 am

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

Postby vyasdevaguddi » Fri Feb 24, 2017 10:20 am

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

Postby vyasdevaguddi » Fri Feb 24, 2017 10:32 am

# 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

Postby vyasdevaguddi » Fri Feb 24, 2017 10:55 am

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

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

Postby mcapra » Fri Feb 24, 2017 3:04 pm

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?
Be sure to check out our Knowledgebase for helpful articles and solutions!

https://github.com/mcapra/
User avatar
mcapra
Support Tech
 
Posts: 2310
Joined: Thu May 05, 2016 3:54 pm
Location: Nagios Enterprises

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

Postby vyasdevaguddi » Tue Feb 28, 2017 1:36 pm

The issue is fixed and you can close the case
vyasdevaguddi
 
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Previous

Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 11 guests