0

Trying to get active checks of a Windows host from my nagios server. At this point I'm not even using nagios, and just running check_nt from the command line.

  • Verified that the port is open, it allows telnet
  • Ensured insecure mode is configured within nsclient.ini
  • Ensured connecting host is entered in "allowed hosts"
  • At this point, security is not a concern, so encryption/passwords/etc are not needed or wanted.
  • For troubleshooting I'm just running the "CLIENTVERSION" command since it's simple
  • I've ensured the nsclient++ service has "allow interaction with desktop" option.

Here is the command I'm using from the allowed host:

check_nt -H 10.10.5.200 -p 12489 -v CLIENTVERSION

This is the output:

[root@nagioshost]# /usr/lib64/nagios/plugins/check_nt -H 10.10.5.200 -p 12489 -v CLIENTVERSION
No data was received from host!
could not fetch information from server

Running 'nscp test' I can see the connection come in but it fails:

D       nrpe Accepting connection from: 10.10.7.101, count=1
E       nrpe Failed to establish secure connection: short read: 219
                    c:\source\nscp\include\socket/connection.hpp:243

Here is my nsclient.ini fields

[/settings/default]
password = Me0zf92h7f
allowed hosts = 10.10.7.101



[/settings/NRPE/server]
verify mode = none
port = 12489
insecure = true



[/modules]
CheckExternalScripts = 1
CheckHelpers = 1
CheckEventLog = 1
CheckNSCP = 1
CheckDisk = 1
CheckSystem = 1
NRPEServer = 1
emmdee
  • 1,935
  • 9
  • 35
  • 56
  • 1
    What if you just run: `check_nrpe -H 10.10.5.200` from the allowed host? This will show if nrpe is properly configured. Also comment out the line with password, and restart nsclient and then check again with `check_nt`. http://docs.nsclient.org/tutorial/nagios/check_nt.html – Diamond Jan 17 '16 at 09:56
  • Thanks, yes check_nrpe worked perfectly. This is solved and answer marked. Appreciate your input!! – emmdee Jan 20 '16 at 04:09

1 Answers1

3

check_nrpe is for NRPEServer and check_nt is for NSCLientServer

So you need to move your configuration over to the NSClientServer module for check_nt to work or better yet stop using check_nt and move over to check_nrpe*.

[/settings/default]
password = Me0zf92h7f
allowed hosts = 10.10.7.101

[/settings/NSClient/server]
port = 12489

[/modules]
CheckExternalScripts = 1
CheckHelpers = 1
CheckEventLog = 1
CheckNSCP = 1
CheckDisk = 1
CheckSystem = 1
NSClientServer = 1
  • check_nt is very limited in comparison to check_nrpe.
Michael Medin
  • 605
  • 3
  • 5
  • I was able to get this working with check_nrpe with little effort -- Thanks! Here is working command I used. `/usr/lib64/nagios/plugins/check_nrpe -H 10.10.5.200 -p 12489 -c check_drivesize -a drive="E" warn="used>75%" crit="used>90%"` Once this was working I simply converted to a Nagios command/service definition and now I'm checking the drive as I needed. – emmdee Jan 20 '16 at 04:08