CHECK_NRPE: Error

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.

CHECK_NRPE: Error

Postby BrunoLosse1 » Mon Nov 05, 2018 10:49 am

Guys,

I've been having a lot of issues trying to configure Nagios Core to monitor some servers.
After a lot of research and settings at my servers I got lost.

My last problem is that I'm receiving the message: CHECK_NRPE: Error - Could not connect to 10.63.248.105: Connection reset by peer.

So here's my Settings:
Nagios Version: 4.4.2
Ubuntu Version: 16.4
NSClient at Windows Server: 0.5.2035

I'm uploading the ini file and the log file.

Can someone help me make the check NRPE work?
Attachments
nsclient.log
(1.47 MiB) Downloaded 9 times
nsclient.ini
(8.2 KiB) Downloaded 13 times
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: CHECK_NRPE: Error

Postby benjaminsmith » Mon Nov 05, 2018 4:11 pm

Hi @ BrunoLosse1

This type of error is often caused by the NRPE settings ( nrpre.cfg) are not set to allow communication with the Nagios server IP. I know you were setting up some other checks recently, were you having trouble with NRPE then?

Please verifty that the line allowed_hosts=127.0.0.1,<Nagios server ip> in the NRPE configuration file contains your Nagios IP address.

For more documentation see this:
CHECK_NRPE: Error - Could not connect to xxx.xxx.xxx.xxx: Connection reset by peer
https://support.nagios.com/forum/viewtopic.php?t=51048#266568
User avatar
benjaminsmith
 
Posts: 155
Joined: Wed Aug 22, 2018 4:39 pm

Re: CHECK_NRPE: Error

Postby BrunoLosse1 » Mon Nov 05, 2018 4:51 pm

But I'm monitoring a Windows Server, the allowed Server is supposed to be at the nsclient.ini right?
There's no nrpe.cfg at my Ubuntu Server.
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: CHECK_NRPE: Error

Postby benjaminsmith » Tue Nov 06, 2018 11:17 am

Ok, lets first make sure Nagios can reach the Windows server using the check_nrpe command. On your Nagios server let me know if your able to run the following command:

Code: Select all
cd /usr/local/nagios/libexec
./check_nrpe -H 10.10.83.94

Where 10.10.83.94 is the ip address of your windows server from the nsclient.ini file.
User avatar
benjaminsmith
 
Posts: 155
Joined: Wed Aug 22, 2018 4:39 pm

Re: CHECK_NRPE: Error

Postby BrunoLosse1 » Tue Nov 06, 2018 11:38 am

benjaminsmith wrote:Ok, lets first make sure Nagios can reach the Windows server using the check_nrpe command. On your Nagios server let me know if your able to run the following command:

Code: Select all
cd /usr/local/nagios/libexec
./check_nrpe -H 10.10.83.94

Where 10.10.83.94 is the ip address of your windows server from the nsclient.ini file.

Yesterday I realised that I had the wrong IP at the allowed hosts under [/settings/NRPE/server] because I copied and pasted the whole .ini from another post I was reading here.

I still have problems with the NRPE after fixing it thou.

Here's the results of the command you gave me:

Using my remote host IP:

administrator@GEUL3BNAGPAS01:/usr/local/nagios/libexec$ ./check_nrpe -H 10.63.248.105
CHECK_NRPE STATE CRITICAL: Socket timeout after 10 seconds.

Using my nagios server IP:

administrator@GEUL3BNAGPAS01:/usr/local/nagios/libexec$ ./check_nrpe -H 10.63.248.131
CHECK_NRPE: Error - Could not connect to 10.63.248.131: Connection reset by peer
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: CHECK_NRPE: Error

Postby benjaminsmith » Tue Nov 06, 2018 12:18 pm

After making changes to your nsclient.ini file, did you restart the service? Are you able to ping the windows box from Nagios?

Our documenation on how to setup Nsclient++ on WIndows for NRPE:
https://assets.nagios.com/downloads/nagiosxi/docs/Enabling-the-NRPE-Listener-in-NSClient-0.4.x-for-Nagios-XI.pdf
User avatar
benjaminsmith
 
Posts: 155
Joined: Wed Aug 22, 2018 4:39 pm

Re: CHECK_NRPE: Error

Postby BrunoLosse1 » Tue Nov 06, 2018 12:34 pm

Yes, I always restart the service.
Yes, I can ping.

The docummentation is for NSClient++ 0.4.x but mine is 0.5.2035 and Nagios XI mine is core.
Does it apply?
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: CHECK_NRPE: Error

Postby BrunoLosse1 » Tue Nov 06, 2018 2:02 pm

benjaminsmith wrote:After making changes to your nsclient.ini file, did you restart the service? Are you able to ping the windows box from Nagios?

Our documenation on how to setup Nsclient++ on WIndows for NRPE:
https://assets.nagios.com/downloads/nagiosxi/docs/Enabling-the-NRPE-Listener-in-NSClient-0.4.x-for-Nagios-XI.pdf


After following the steps I got this error: CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with 10.63.228.51: 1

I'll attach my .ini again.
There are a lot of "UNKNOWN" there, is it normal?
Attachments
nsclient.ini
(13.54 KiB) Downloaded 15 times
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: CHECK_NRPE: Error

Postby benjaminsmith » Tue Nov 06, 2018 3:41 pm

Hello,

Thank you for the updated ini file, and let's try to make a few changes.

1. At the the top of the file, you'll find a setting for allowed hosts = 10.63.248.131. Make sure that is set to your Nagios server ip.

2. At line number 31, set the ssl options to ssl options =.

Lastly, if your're still having trouble, please try using the attached nsclient.ini file along with the correct entries for allowed host and password.

Let me know if you're able to get it working.
Attachments
nsclient.ini
(23.16 KiB) Downloaded 10 times
User avatar
benjaminsmith
 
Posts: 155
Joined: Wed Aug 22, 2018 4:39 pm

Re: CHECK_NRPE: Error

Postby BrunoLosse1 » Wed Nov 07, 2018 7:38 am

The IP is correct, I changed what you said and didnt work, also tried using your .ini and it didnt work either.
I tried not using a password as well to see if anything changes but still the same.

I'll Upload the log, my commands.cfg and windows.cfg, maybe there's something wrong there.

Thank you so much for the attention by the way. I'm almost freaking out with this project.


This is the mess that is my current Web Interface lol
https://imgur.com/a/dWsef3T
Image

And my Objects directory is like that with duplicate files with a "~"
Do you know what that means?

https://imgur.com/a/OktmbFU
Image
Attachments
commands.cfg
(7.69 KiB) Downloaded 9 times
windows.cfg
(19.25 KiB) Downloaded 6 times
nsclient.log
(82.86 KiB) Downloaded 15 times
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Next

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 29 guests