Hi People, i´m triing to monitoring several windows host and i need use nsclient++ only.
in my icinga server i tried to check one test host using /usr/lib/nagios/plugins/check_nt -p 12489 -s "password" -H "test host ip" r -v CPULOAD -l 5,80,90 -t 60
the result is CRITICAL - Socket timeout after 60 seconds
all another check_nt commands fails whit the same error
In the client side, i have de nsclient.ini configured:
Tbh I have never used the check_nt part of NSClient. I only ever used NRPE.
Check the nsclient.ini for the configured timeouts.
Are the correct modules enabled? Maybe try running nscp settings --generate --add-defaults --load-all from the Windows cmd (where the nscp.exe is located), to load all modules and the whole default config. With nscp settings --generate --remove-defaults you can remove the defaults again
Have you checked the nsclient.log on the windows machine?
As for the firewall:
Windows:
– Normally when installing the nsclient, the windows firewall is configured.
other firewalls:
– as @MoeJoe said you will have to check if the required ports are open. check_nt uses 12489 as default, NRPE uses tcp/5666
Thanks for the help. Is a problem with these client in particular, the firewall is off and the client are LISTEN con 5666 port and 12489 port.
the commands nc -zv “ip” 12489 and 5666 port from the server are ok.
Did you restart NSclient service after you added the icinga2 core (or satellite) ip in allowed hosts?
Are you sure about the added ip in allowed hosts? Maybe there is NAT between.
Network firewall in between? Port 12489 opened?
Software firewall on client? Port 12489 opened?
Anti-Virus software could also interfere…
Try communication with telnet (nc still reports succeeded, even if IP is not listed in allowed hosts!)
A successful communication would look like this:
# telnet windows 12489
Trying 10.140.20.10...
Connected to windows.example.com.
Escape character is '^]'.
A unsuccessful communication is closed immediately by NSclient:
# telnet windows 12489
Trying 10.140.20.10...
Connected to windows.example.com.
Escape character is '^]'.
Connection closed by foreign host.