Page 1 of 1

Need clarification!!!

Posted: Mon Oct 30, 2017 1:27 pm
by ponnpr7
Hi Support,

I would to know about these 2 different Critical error that is attached. What is Return code 255 is out of bounds? and check_NRPE:socket timeout.

Thanks,
Ravi

Re: Need clarification!!!

Posted: Mon Oct 30, 2017 2:14 pm
by bolson
As a start toward troubleshooting your errors, from the command line of your Nagios XI server run the following commands, replacing remote_ip with the IP address of the host you are monitoring and post the result:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H remote_ip
nmap remote_ip -Pn -p 5666 
If nmap is not installed run:

Code: Select all

yum install nmap -y
Then from the cli of your remote host:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1

Re: Need clarification!!!

Posted: Tue Oct 31, 2017 12:59 pm
by ponnpr7
Kindly find the output as per your resquest:

Code: Select all

[root@nagiosxi ~]# /usr/local/nagios/libexec/check_nrpe -H 10.139.70.165
CHECK_NRPE: Socket timeout after 10 seconds.
[root@nagiosxi ~]# /usr/local/nagios/libexec/check_nrpe -H 10.139.70.165
CHECK_NRPE: Socket timeout after 10 seconds.
[root@nagiosxi ~]# nmap 10.139.70.165 -Pn -p 5666

Starting Nmap 6.47 ( http://nmap.org ) at 2017-10-31 12:57 CDT
Nmap scan report for 10.139.70.165
Host is up.
PORT     STATE    SERVICE
5666/tcp filtered nrpe

Nmap done: 1 IP address (1 host up) scanned in 2.08 seconds
[root@nagiosxi ~]# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
CHECK_NRPE: Error - Could not complete SSL handshake.

Re: Need clarification!!!

Posted: Tue Oct 31, 2017 3:38 pm
by dwasswa
Hi @ ponnpr7,

I suggest that you follow the steps in this kb article to resolve the check_NRPE: socket timeout error...https://support.nagios.com/kb/article/n ... conds.html.

As for the 255 out of bounds error, this is possibly due to the fact that the Nagios XI server IP address is not included in the nrpe.cfg or xinetd.d file on your remote host.

Depending on how nrpe is set up on your remote host, it could be that it is using xinetd as a daemon to run it, or it has its own dedicated daemon.

To identify which is being used, run his command...ls -la /etc/xinetd.d/nrpe.

If you get output like this -rw-r--r--. 1 root root 483 Feb 22 12:23 /etc/xinetd.d/nrpe, xinetdis being used and you should follow the steps below:

Edit the nrpe file by running the command vi /etc/xinetd.d/nrpe and change the follwoing line only_from = 127.0.0.1 to only_from = 127.0.0.1 <Nagios XI server ip>. Its delimited by a space.

Close and save the file the restart xinetd service by running the command sudo service xinetd restart.

However, if you got the output ls: cannot access /etc/xinetd.d/nrpe: No such file or directory from running the command ls -la /etc/xinetd.d/nrpe then nrpe has its own daemon and you should follow the steps below.

Please go and edit nrpe.cfg file located at /usr/local/nagios/etc/nrpe.cfg(or wherever you have it located) and add your Nagios XI

server IP address at the line that says allowed_hosts=127.0.0.1,<Nagios XI server IP>.

After adding your XI server IP to that file, please restart the nrpe service by running the command sudo service nrpe restart on your remote host.


Secondly, you are getting the output filtered under STATE after running the Nmap port scan for the following reason:


Nmap cannot determine whether the port is open because packet filtering prevents its probes from reaching the port. The filtering could be from a dedicated firewall device, router rules, or host-based firewall software.


Please check your firewall on the remote host(or whichever way you have it setup) for port 5666. It should be open so the nrpe agent can communicate with the Nagios XI server.


For information about the firewall on Ubuntu, please refer to this link...https://help.ubuntu.com/lts/serverguide/firewall.html.

Please let me know if the kb article and the instructions above resolves your issue or if you have any questions.

Re: Need clarification!!!

Posted: Tue Nov 07, 2017 11:26 am
by ponnpr7
Thanks for the very informative information you provide, is it capable of handling IPv6 hosts.

Thanks,
Ravi

Re: Need clarification!!!

Posted: Tue Nov 07, 2017 11:46 am
by npolovenko
@ponnpr7, Was your original issue resolved?
is it capable of handling IPv6 hosts.
Yes, you could also pass -6 flag in your command:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 10.139.70.165 -6

Re: Need clarification!!!

Posted: Tue Nov 07, 2017 12:28 pm
by ponnpr7
Most the new sites are defined with IPv6 so how do I defined the check_nrpe?

Re: Need clarification!!!

Posted: Tue Nov 07, 2017 1:34 pm
by kyang
If all of your sites use IPv6, then adding the -6 into your check_nrpe command would do it.

XI Home --> Configure --> Core Config Manager --> Commands --> check_nrpe --> add -6 into the command line.

But, if there are some sites that do not use IPv6, this wouldn't be a good way since it will pass IPv6 to all checks using check_nrpe.

Therefore, I would suggest that you must modify each of the specific sites that use IPv6 with -6 in the host/service check_command and then apply the configuration.

You would still need to add more $ARG$ to the check_nrpe command line to accept the -6

Does this help?

Re: Need clarification!!!

Posted: Tue Nov 07, 2017 5:35 pm
by ponnpr7
Cool thanks.

Ravi

Re: Need clarification!!!

Posted: Tue Nov 07, 2017 5:36 pm
by kyang
Did you still have questions or are we okay to close this topic?