check_nrpe operations on windows

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Pierogi
Posts: 21
Joined: Thu Feb 15, 2018 10:28 am

Re: check_nrpe operations on windows

Post by Pierogi »

OK, I'm including an updated ini file so there is not confusion so you see what is currently running.
Attachments
nsclient-EX206-2018-0815.ini
(28.89 KiB) Downloaded 291 times
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: check_nrpe operations on windows

Post by lmiltchev »

My settings are the same, with the exception of this line:

Code: Select all

extended response = 0
and I am not having these issues.

How did you install NRPE on the Nagios Core machine? I wonder if it was compiled with no SSL support...

Run the following commands and show the output:

Code: Select all

/usr/local/nagios/bin/nrpe
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -n
Be sure to check out our Knowledgebase for helpful articles and solutions!
Pierogi
Posts: 21
Joined: Thu Feb 15, 2018 10:28 am

Re: check_nrpe operations on windows

Post by Pierogi »

Hi lmiltchev.

I don't have the exact notes from my NRPE installation but I likely used something like these

- https://www.digitalocean.com/community/ ... untu-16-04
- Step 2 — Installing the check_nrpe Plugin

Here is the output I get from the commands:
/usr/local/nagios/libexec$ ./check_nrpe -H 127.0.0.1
CHECK_NRPE: Error receiving data from daemon.
/usr/local/nagios/libexec$ ./check_nrpe -H 127.0.0.1 -n
CHECK_NRPE: Error receiving data from daemon.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_nrpe operations on windows

Post by ssax »

I imported your nsclient.ini into mine and changed the allowed hosts and it worked fine for mine. What are you seeing in your nsclient.log on that machine?

Try setting it to trace, restart the nsclient++ service, run a test and then see what the nsclient.log outputs:

Code: Select all

; LOG SECTION - Configure log properties.
[/settings/log]

; FILENAME - The file to write log data to. Set this to none to disable log to file.
file name = ${exe-path}/nsclient.log

; DATEMASK - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
date format = %Y-%m-%d %H:%M:%S

; LOG LEVEL - Log level to use. Available levels are error,warning,info,debug,trace
level = trace
Thank you
Pierogi
Posts: 21
Joined: Thu Feb 15, 2018 10:28 am

Re: check_nrpe operations on windows

Post by Pierogi »

Thanks for doing that, ssax. Your work (and lmiltchev) let me rule out my local nsclient.ini configuration.

The problem must be with my Nagios Core install or configuration.

Please see the attached log at trace level.

These are the commands I ran with the trace:
/usr/local/nagios/libexec$ ./check_nrpe -H 10.192.3.173
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
/usr/local/nagios/libexec$ ./check_nrpe -H 10.192.3.173 -c check_updates -t 30
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

The logs in question looked similar to what I've seen in the debug logs before:

2018-08-21 12:07:06: debug:c:\source\master\include\nrpe/server/protocol.hpp:92: Accepting connection from: 10.192.0.7, count=1
2018-08-21 12:07:06: error:c:\source\master\include\socket/connection.hpp:273: Seems we other end is not using ssl: unknown protocol
2018-08-21 12:07:06: error:c:\source\master\include\socket/connection.hpp:274: Please review the ssl option as well as ssl options in settings.
2018-08-21 12:07:28: debug:c:\source\master\include\check_nt/server/protocol.hpp:77: Accepting connection from: 10.192.0.7
Attachments
nsclient-20180851-trace.log
(14.28 KiB) Downloaded 294 times
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_nrpe operations on windows

Post by ssax »

Code: Select all

Seems we other end is not using ssl
On your Core server, please run these commands:

Code: Select all

cd /tmp
rm -rf nrpe-3.2.1
curl -L -O https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-3.2.1/nrpe-3.2.1.tar.gz
tar zxf nrpe-3.2.1.tar.gz
cd nrpe-3.2.1
./configure
Please send the full output of the configure command once it's done (attach as a file) so that we can review your SSL settings.
Pierogi
Posts: 21
Joined: Thu Feb 15, 2018 10:28 am

Re: check_nrpe operations on windows

Post by Pierogi »

I've run the commands and attached the output.

As always, thank you.
Attachments
57877-05 core nrpe configure.txt
(11.68 KiB) Downloaded 287 times
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_nrpe operations on windows

Post by ssax »

cd into the nrpe-3.2.1 directory and run this command:

Code: Select all

make all
Then cd into nrpe-3.2.1/src and run the check command from there and see if it works.
Pierogi
Posts: 21
Joined: Thu Feb 15, 2018 10:28 am

Re: check_nrpe operations on windows

Post by Pierogi »

When I do that, I get this response:

local:/tmp/nrpe-3.2.1$ make all
make: *** No rule to make target 'all'. Stop.

Running next command even though the first did not seem to work:

local:/tmp/nrpe-3.2.1/src$ ./check_nrpe -H 10.192.3.173
-bash: ./check_nrpe: No such file or directory

local:/tmp/nrpe-3.2.1/src$ dir
acl.c check_nrpe.c Makefile.in nrpe.c snprintf.c utils.c
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_nrpe operations on windows

Post by tgriep »

I would try and reinstall the NRPE Agent and plugin using this KB article.
https://support.nagios.com/kb/article/n ... e-515.html
Something must of went wrong in your previous try so delete all of that and try it again.
On the bottom of the article has the "Install check_nrpe Plugin Only" section.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked