Fix Sockets Timeout Error for Nagios XI

Problem
After you configured a Windows server client, you may recieve this error:

CRITICAL – Socket timeout after 10 seconds

Analysis
When you check the service script, you will see:

USER1/check_nt -H HOSTADDRESS -s "ARG1" -p 12489 -v ARG2 ARG3 ARG4

And back to the server, you will find port 12489 is not listened.

Resolution
 1. Add NSClientServer to configuration nsclient.ini.

[/modules]
# Enable NSClient Server module
NSClientServer = 1
[/settings/NSClient/server]
# Set the port to 12489, the default value
port = 12489

 2. Active NSClientServer module, and restart NSCP service.

Set-Location "C:\Program Files\NSClient++"
.\nscp.exe settings --activate-module NSClientServer --add-defaults
Restart-Service NSCP

 3. Check if the port is listened.

Get-NetTCPConnection -OwningProcess (Get-Process -Name "NSCP").ID

Conclusion
After activate the NSClientServer module, error mentioned above has gone.

Enjoy it!

Leave a Reply

Your email address will not be published. Required fields are marked *