Page 2 of 5

Re: CHECK_NRPE: Error

Posted: Wed Nov 07, 2018 11:19 am
by BrunoLosse1
When I run sudo systemctl status nrpe I get the following response:

root@GEUL3BNAGPAS01:/usr/local/nagios/etc/objects# sudo systemctl status nrpe
● nrpe.service - Nagios Remote Plugin Executor
Loaded: loaded (/lib/systemd/system/nrpe.service; enabled; vendor preset: enabled)
Active: active (running) since Seg 2018-11-05 12:10:43 -02; 2 days ago
Docs: http://www.nagios.org/documentation
Main PID: 20745 (nrpe)
Tasks: 1
Memory: 740.0K
CPU: 32ms
CGroup: /system.slice/nrpe.service
└─20745 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f

Nov 05 12:10:43 GEUL3BNAGPAS01 systemd[1]: Started Nagios Remote Plugin Executor.
Nov 05 12:10:43 GEUL3BNAGPAS01 nrpe[20745]: Starting up daemon
Nov 05 12:10:43 GEUL3BNAGPAS01 nrpe[20745]: Server listening on 0.0.0.0 port 5666.
Nov 05 12:10:43 GEUL3BNAGPAS01 nrpe[20745]: Server listening on :: port 5666.
Nov 05 12:10:43 GEUL3BNAGPAS01 nrpe[20745]: Listening for connections on port 5666
Nov 05 12:10:43 GEUL3BNAGPAS01 nrpe[20745]: Allowing connections from: 127.0.0.1,::1
Nov 06 14:22:39 GEUL3BNAGPAS01 nrpe[48592]: Host 10.63.248.131 is not allowed to talk to us!
Nov 07 10:28:28 GEUL3BNAGPAS01 nrpe[17313]: Host 10.63.248.131 is not allowed to talk to us!

Re: CHECK_NRPE: Error

Posted: Wed Nov 07, 2018 1:04 pm
by benjaminsmith
Hi @BrunoLosse1,

We reviewed your files, and I have a few suggestions along a few questions.

1. Looks like your getting connection attempts from 10.63.24.130. What's running at this address?

2. You've got schedule jobs enabled. Is this intended? You can set Scheduler = 0 or I have attached another nsclient.ini file with the minimal settings that you can use.

3. Your file age checks such as ( check_nt! FILEAGE -l "d:\\Interfaces\SANTANDER\OUTBOX\GE200492\*.rem"! -w 600 -c 1800) are not working correctly. We tested the command here and it does work, so check your file path or permissions settings on the Window hosts. Also, this command does not support * in the file paths.

Let me know if you get it resolved.

Re: CHECK_NRPE: Error

Posted: Thu Nov 08, 2018 6:45 am
by BrunoLosse1
1. Looks like your getting connection attempts from 10.63.24.130. What's running at this address?
Where did you get that? There's nothing with this IP.
2. You've got schedule jobs enabled. Is this intended? You can set Scheduler = 0 or I have attached another nsclient.ini file with the minimal settings that you can use.
I'm not sure I know what that means.
3. Your file age checks such as ( check_nt! FILEAGE -l "d:\\Interfaces\SANTANDER\OUTBOX\GE200492\*.rem"! -w 600 -c 1800) are not working correctly. We tested the command here and it does work, so check your file path or permissions settings on the Window hosts. Also, this command does not support * in the file paths.
The path is correct, but there are no files there. Maybe that's the problem.
Is there a way to specify that I need any file with .rem extension? Can I do it using NRPE?

Re: CHECK_NRPE: Error

Posted: Thu Nov 08, 2018 7:38 am
by BrunoLosse1
I've created a .txt file to test the command and it works fine with *
I still have two problems, the one I posted here https://support.nagios.com/forum/viewto ... =7&t=50931 and the fact that the command returns error if the folder is empty.

Re: CHECK_NRPE: Error

Posted: Thu Nov 08, 2018 12:22 pm
by benjaminsmith
Hello,

As far the IP address, my apologies, as I entered the wrong address. I was looking at your log file and noticed this entry?: Rejected connection from: 10.63.225.130.

Another option is to use check_nrpe which will support more options. Please refer to the "NSClient++ via check_nrpe" section of the following document for example checks:

File And Folder ChecksFile And Folder Checks
https://support.nagios.com/kb/article/f ... s-783.html

Re: CHECK_NRPE: Error

Posted: Thu Nov 08, 2018 1:32 pm
by BrunoLosse1
benjaminsmith wrote:Hello,

As far the IP address, my apologies, as I entered the wrong address. I was looking at your log file and noticed this entry?: Rejected connection from: 10.63.225.130.

Another option is to use check_nrpe which will support more options. Please refer to the "NSClient++ via check_nrpe" section of the following document for example checks:

File And Folder ChecksFile And Folder Checks
https://support.nagios.com/kb/article/f ... s-783.html
This is The IP of the old Nagios Server I was testing.

As far as the Nrpe, I can't get it to work for some reason...

Re: CHECK_NRPE: Error

Posted: Thu Nov 08, 2018 3:31 pm
by benjaminsmith
Ok. That make sense.

When you run check_nrpe, what kind of error are you getting?

Code: Select all

cd /usr/local/nagios/libexec
./check_nrpe -H <host ip adddress>

Re: CHECK_NRPE: Error

Posted: Thu Nov 08, 2018 5:18 pm
by BrunoLosse1
benjaminsmith wrote:Ok. That make sense.

When you run check_nrpe, what kind of error are you getting?

Code: Select all

cd /usr/local/nagios/libexec
./check_nrpe -H <host ip adddress>
I get the following error: CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with

Re: CHECK_NRPE: Error

Posted: Thu Nov 08, 2018 5:52 pm
by npolovenko
@BrunoLosse1, Please replace your nsclient.ini file with the one I attached to this post. Then restart the nsclient service on your windows server. And execute this command from the nagios server:
cd /usr/local/nagios/libexec
./check_nrpe -H <host ip adddress>
Where <host ip adddress> is the windows server IP address.

Re: CHECK_NRPE: Error

Posted: Fri Nov 09, 2018 6:42 am
by BrunoLosse1
Same error.
This is what I could see at the log that may help:

Code: Select all

2018-11-09 09:19:31: debug:c:\source\master\include\nrpe/server/protocol.hpp:92: Accepting connection from: 10.63.248.131, count=1
2018-11-09 09:19:31: error:c:\source\master\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040
2018-11-09 09:19:45: debug:c:\source\master\include\nrpe/server/protocol.hpp:92: Accepting connection from: 10.63.248.131, count=1
2018-11-09 09:19:45: error:c:\source\master\include\socket/connection.hpp:276: Failed to establish secure connection: sslv3 alert handshake failure: 1040