Can't get check_nrpe to work on Windows host

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.
craigtho
Posts: 16
Joined: Mon Sep 16, 2019 9:23 am

Re: Can't get check_nrpe to work on Windows host

Post by craigtho »

Updated as requested - I did comment out your example password as my server isn't configured to use one:
nsclient.ini
(9.42 KiB) Downloaded 98 times
On Nagios Server:

Code: Select all

root@glamon2:/usr/local/nagios/libexec# ./check_nrpe -H 192.168.60.41 -p 5666
CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with 192.168.60.41: 1
root@glamon2:/usr/local/nagios/libexec#
Following this, I edited it to say use ssl = 0 as I'm not using SSL in my configuration (yet):
nsclient.ini
nsclient.ini - edited
(9.42 KiB) Downloaded 99 times
Then on the Nagios Server:

Code: Select all

root@glamon2:/usr/local/nagios/libexec# ./check_nrpe -H 192.168.60.41 -p 5666
CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with 192.168.60.41: 1
root@glamon2:/usr/local/nagios/libexec#
Even after the change (and nsclient has been restarted 3 times for good measure)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Can't get check_nrpe to work on Windows host

Post by scottwilkerson »

If you aren't using ssl you need to add a -n to the command

Code: Select all

./check_nrpe -H 192.168.60.41 -p 5666 -n

Code: Select all

-n, --no-ssl                 Do no use SSL
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
craigtho
Posts: 16
Joined: Mon Sep 16, 2019 9:23 am

Re: Can't get check_nrpe to work on Windows host

Post by craigtho »

Okay, thank you for your help by the way.

So I reverted that change, restarted NSClient++ and ran:

Code: Select all

root@glamon2:/usr/local/nagios/libexec# ./check_nrpe -H 192.168.60.41 -p 5666 -n
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
At least we are getting a new error now. But sadly, still not working...I've never even seen this before.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Can't get check_nrpe to work on Windows host

Post by scottwilkerson »

Let's also try to add a -2 for version 2 packets

Code: Select all

./check_nrpe -H 192.168.60.41 -p 5666 -n -2
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
craigtho
Posts: 16
Joined: Mon Sep 16, 2019 9:23 am

Re: Can't get check_nrpe to work on Windows host

Post by craigtho »

Sadly, just the same response:

Code: Select all

root@glamon2:/usr/local/nagios/libexec# ./check_nrpe -H 192.168.60.41 -p 5666 -n -2
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
craigtho
Posts: 16
Joined: Mon Sep 16, 2019 9:23 am

Re: Can't get check_nrpe to work on Windows host

Post by craigtho »

Any more help would be greatly appreciated.

I've tried changing some settings and hotswapping Scott's settings with my own and continually get the same errors. I've reverted back to my last post and still getting the same errors.
craigtho
Posts: 16
Joined: Mon Sep 16, 2019 9:23 am

Re: Can't get check_nrpe to work on Windows host

Post by craigtho »

Update: Possible Fix

NSClient.ini here:
nsclient.ini
(9.44 KiB) Downloaded 145 times
I changed ssl options = & verify mode = none

and then on the Nagios server:

Code: Select all

root@glamon2:/usr/local/nagios/libexec# ./check_nrpe -H 192.168.60.41 -n
I (0,4,1,73 2012-12-17) seem to be doing fine...
However:

Code: Select all

root@glamon2:/usr/local/nagios/libexec# ./check_nrpe -H 192.168.60.41 -n -c check_memory -a 'warn=free<20%' 'crit=free<10%'
CHECK_NRPE: No output returned from daemon.
root@glamon2:/usr/local/nagios/libexec#
Could be that this is an output due to me using Scott's config file for testing? Any advice?
craigtho
Posts: 16
Joined: Mon Sep 16, 2019 9:23 am

Re: Can't get check_nrpe to work on Windows host

Post by craigtho »

Final Update:

My command parameter was wrong:

Code: Select all

root@glamon2:/usr/local/nagios/libexec# ./check_nrpe -H 192.168.60.41 -n -c CheckCPU -a warn=80 crit=90 time=20m time=10s time=4
OK CPU Load ok.|'20m'=2%;80;90 '10s'=2%;80;90 '4'=7%;80;90
I think that means case is closed? Unless anything else with the .ini file needs changed that you someone can recommend.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Can't get check_nrpe to work on Windows host

Post by scottwilkerson »

craigtho wrote:Final Update:

My command parameter was wrong:

Code: Select all

root@glamon2:/usr/local/nagios/libexec# ./check_nrpe -H 192.168.60.41 -n -c CheckCPU -a warn=80 crit=90 time=20m time=10s time=4
OK CPU Load ok.|'20m'=2%;80;90 '10s'=2%;80;90 '4'=7%;80;90
I think that means case is closed? Unless anything else with the .ini file needs changed that you someone can recommend.
Great!

Glad it is resolved!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked