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.

Re: CHECK_NRPE: Error

Postby BrunoLosse1 » Wed Nov 07, 2018 11:19 am

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!
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: CHECK_NRPE: Error

Postby benjaminsmith » Wed Nov 07, 2018 1:04 pm

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.
Attachments
nsclient.ini
(903 Bytes) Downloaded 14 times
User avatar
benjaminsmith
 
Posts: 162
Joined: Wed Aug 22, 2018 4:39 pm

Re: CHECK_NRPE: Error

Postby BrunoLosse1 » Thu Nov 08, 2018 6:45 am

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?
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: CHECK_NRPE: Error

Postby BrunoLosse1 » Thu Nov 08, 2018 7:38 am

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 viewtopic.php?f=7&t=50931 and the fact that the command returns error if the folder is empty.
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: CHECK_NRPE: Error

Postby benjaminsmith » Thu Nov 08, 2018 12:22 pm

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/file-and-folder-checks-783.html
User avatar
benjaminsmith
 
Posts: 162
Joined: Wed Aug 22, 2018 4:39 pm

Re: CHECK_NRPE: Error

Postby BrunoLosse1 » Thu Nov 08, 2018 1:32 pm

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/file-and-folder-checks-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...
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: CHECK_NRPE: Error

Postby benjaminsmith » Thu Nov 08, 2018 3:31 pm

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>
User avatar
benjaminsmith
 
Posts: 162
Joined: Wed Aug 22, 2018 4:39 pm

Re: CHECK_NRPE: Error

Postby BrunoLosse1 » Thu Nov 08, 2018 5:18 pm

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
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

Re: CHECK_NRPE: Error

Postby npolovenko » Thu Nov 08, 2018 5:52 pm

@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.
Attachments
nsclient.ini
(23.17 KiB) Downloaded 18 times
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
npolovenko
Support Tech
 
Posts: 2367
Joined: Mon May 15, 2017 5:00 pm

Re: CHECK_NRPE: Error

Postby BrunoLosse1 » Fri Nov 09, 2018 6:42 am

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
BrunoLosse1
 
Posts: 31
Joined: Tue Oct 23, 2018 1:22 pm

PreviousNext

Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 17 guests