Page 2 of 2
Re: Can't get check_nrpe to work on Windows host
Posted: Mon Sep 16, 2019 4:12 pm
by craigtho
Updated as requested - I did comment out your example password as my server isn't configured to use one:
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 193 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)
Re: Can't get check_nrpe to work on Windows host
Posted: Mon Sep 16, 2019 4:37 pm
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
Re: Can't get check_nrpe to work on Windows host
Posted: Mon Sep 16, 2019 4:44 pm
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.
Re: Can't get check_nrpe to work on Windows host
Posted: Mon Sep 16, 2019 4:49 pm
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
Re: Can't get check_nrpe to work on Windows host
Posted: Mon Sep 16, 2019 4:51 pm
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).
Re: Can't get check_nrpe to work on Windows host
Posted: Tue Sep 17, 2019 6:52 am
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.
Re: Can't get check_nrpe to work on Windows host
Posted: Tue Sep 17, 2019 7:35 am
by craigtho
Update: Possible Fix
NSClient.ini here:
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?
Re: Can't get check_nrpe to work on Windows host
Posted: Tue Sep 17, 2019 7:47 am
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.
Re: Can't get check_nrpe to work on Windows host
Posted: Tue Sep 17, 2019 10:12 am
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