Need clarification!!!

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ponnpr7
Posts: 90
Joined: Fri Jul 28, 2017 3:55 pm

Need clarification!!!

Post 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
You do not have the required permissions to view the files attached to this post.
bolson

Re: Need clarification!!!

Post 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
ponnpr7
Posts: 90
Joined: Fri Jul 28, 2017 3:55 pm

Re: Need clarification!!!

Post 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.
dwasswa

Re: Need clarification!!!

Post 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.
ponnpr7
Posts: 90
Joined: Fri Jul 28, 2017 3:55 pm

Re: Need clarification!!!

Post by ponnpr7 »

Thanks for the very informative information you provide, is it capable of handling IPv6 hosts.

Thanks,
Ravi
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Need clarification!!!

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ponnpr7
Posts: 90
Joined: Fri Jul 28, 2017 3:55 pm

Re: Need clarification!!!

Post by ponnpr7 »

Most the new sites are defined with IPv6 so how do I defined the check_nrpe?
kyang

Re: Need clarification!!!

Post 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?
ponnpr7
Posts: 90
Joined: Fri Jul 28, 2017 3:55 pm

Re: Need clarification!!!

Post by ponnpr7 »

Cool thanks.

Ravi
kyang

Re: Need clarification!!!

Post by kyang »

Did you still have questions or are we okay to close this topic?
Locked