Page 1 of 2

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

Posted: Fri Feb 10, 2017 3:29 pm
by vyasdevaguddi
i have added new server in nagios and when i run service nagios restart its working good with no issue but in the nagios gui and i see this error message

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

Posted: Mon Feb 13, 2017 10:46 am
by dwhitfield
Please run one of those commands from the command line. Please show us the command as you run it and any output. Also, What version of Core are you using? Was it compiled from source or installed from distro repos? On what OS/version is nagios running? cat /etc/*-release may be of use.

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

Posted: Mon Feb 13, 2017 1:48 pm
by vyasdevaguddi
i am running this command from the nagios cmd server

/usr/local/nagios/libexec/check_nrpe -H localhost check_tmp
connect to address 10.1X.X6.1XX port 5666: No route to host
connect to host localhost port 5666: No route to host

i am using NagiosĀ® Coreā„¢ Version 4.1.0rc2 and using the Rhel 6.8

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

Posted: Mon Feb 13, 2017 2:22 pm
by dwhitfield
What's the output of the following:

Code: Select all

nmap -p 5666 localhost
service xinetd status
cat /etc/xinetd.d/nrpe
find / -name nrpe.cfg | xargs cat
Perhaps there is an IPv4 vs. IPv6 issue?

Also, you should run through https://assets.nagios.com/downloads/nag ... utions.pdf. If you get stuck at any point in the document, please let us know.

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

Posted: Mon Feb 13, 2017 5:22 pm
by vyasdevaguddi
Here are the error message i am getting as per screen shot

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

Posted: Mon Feb 13, 2017 5:32 pm
by dwhitfield
So, we have progress!

Did you look at Section V. CHECK_NRPE: Received 0 Bytes From Daemon. Check The Remote Server Logs For Error Messages, starting on page 6 of https://assets.nagios.com/downloads/nag ... utions.pdf ?

Can you attach your /usr/local/nagios/etc/nrpe.cfg ? I asked about Core, but I will about NRPE. Did you using a binary we provided or did you compile from source? If a binary, could you point us to the download? If source, could you point us to the instructions you used to compile? Thanks!

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

Posted: Tue Feb 14, 2017 2:14 pm
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


# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for
# command arguments *AND* the dont_blame_nrpe directive in this
# config file is set to '1'. This poses a potential security risk, so
# make sure you read the SECURITY file before doing this.

#command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
#command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
#command[check_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
command[check_logfiles]=/usr/local/nagios/libexec/check_logfiles $ARG1$
command[check_procs]=/usr/local/nagios/libexec/check_procs
command[check_swap]=/usr/local/nagios/libexec/check_swap -w $ARG1$ -c $ARG2$
command[check_http]=/usr/local/nagios/libexec/check_http
command[check_ping]=/usr/local/nagios/libexec/check_ping
command[check_ssh]=/usr/local/nagios/libexec/check_ssh

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

Posted: Tue Feb 14, 2017 2:18 pm
by dwhitfield
If you are concerned about security, you can PM me your /usr/local/nagios/etc/nrpe.cfg. We need to be able to see the directives to see if you have it set up correctly.

Also, in regards to NRPE did you using a binary we provided or did you compile from source? If a binary, could you point us to the download? If source, could you point us to the instructions you used to compile? If you don't know because you inherited the server, that's fine, we can work around it, but it would be really helpful information to have. Thanks!

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

Posted: Tue Feb 14, 2017 2:46 pm
by vyasdevaguddi
i am using NRPE which is compile from source and i have copied the /usr/local/nagios/etc/nrpe.cfg

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

Posted: Tue Feb 14, 2017 3:10 pm
by dwhitfield
Thanks for the file. The most obvious potential issue there checks out.

What's the output of history | grep nrpe? It may be nothing, but it's worth a look.

Also, you never answered my question about Section V. CHECK_NRPE: Received 0 Bytes From Daemon. Check The Remote Server Logs For Error Messages, starting on page 6 of https://assets.nagios.com/downloads/nag ... utions.pdf. We need to know if you went through that, so we aren't just copying the same commands from that into the forum.