Page 1 of 1

Nagios Failed pulling info from NSClient++

Posted: Mon May 13, 2019 12:36 pm
by Kahlid74
I have a really intriguing issue. I have a Nagios Server (10.4.20.221) who is attempting to connect to a Windows Server 2016 Box (10.4.20.210) and it's failing. They are on the same layer 2 Subnet, and the Ping check is up and happy in Nagios, but all other services FAIL. Here's a quick blurb when I run NPRE commands from Nagios against the box:
[root@C3MON01 /]# /usr/local/nagios/libexec/check_nrpe -H 10.4.20.210
I (0.4.4.23 2016-04-05) seem to be doing fine...
[root@C3MON01 /]# /usr/local/nagios/libexec/check_nt -H 10.4.20.210 -s "PasswordHere" -p 12489 -v CPULOAD -l 5,80,90
CRITICAL - Socket timeout
[root@C3MON01 /]#
What is going on here? This is absolutely infuriating. No Firewall in between, windows FW disabled on windows box completely. Service up and happy but losing it's mind on any and every command I send to it.

Any ideas?

Support Info
1). Nagios XI 5.6.1
2). CentOS Linux release 7.6.1810 (Core)
3). 64bit
4). VMware Image
5). NO special configurations. Straight out of the box.
6). No multiple issues, just can get NSClient++ to work with anyone.


Thanks for your time!

Re: Nagios Failed pulling info from NSClient++

Posted: Mon May 13, 2019 1:40 pm
by benjaminsmith
Hello @kahlid74,

First try increasing the timeout settings on your check command.

Code: Select all

/usr/local/nagios/libexec/check_nt -H 10.4.20.210 -s "PasswordHere" -p 12489 -v CPULOAD -l 5,80,90 -t 60
If the issue persists, do you see any errors in the nsclient.log file on what could be causing the client to timeout? Also, can you post the NSClient configuration file for us to review. By default, the nsclient.ini file is found in the following directory:

Code: Select all

C:\Program Files\NSClient++
Thanks.

Re: Nagios Failed pulling info from NSClient++

Posted: Mon May 13, 2019 1:52 pm
by Kahlid74
Thanks @benjaminsmith for replying! I did try expanding timeout, but no dice. Expanded it to 120 seconds, and still timedout.

There is nothing in the local log. Attached is the config file on the client.

Re: Nagios Failed pulling info from NSClient++

Posted: Mon May 13, 2019 1:55 pm
by scottwilkerson
You need to change the following in your config, change this

Code: Select all

; NSClientServer - A server that listens for incoming check_nt connection and processes incoming requests.
NSClientServer = 0
to this

Code: Select all

; NSClientServer - A server that listens for incoming check_nt connection and processes incoming requests.
NSClientServer = 1
then restart NSClient++ service

Re: Nagios Failed pulling info from NSClient++

Posted: Mon May 13, 2019 2:33 pm
by Kahlid74
Thanks @Scottwilkerson that fixed it.

Can I ask, where would I have known to do that? Did I miss a tutorial or something else that showed me how to do that? I feel like a dolt for missing such an easy config option.

Re: Nagios Failed pulling info from NSClient++

Posted: Mon May 13, 2019 2:38 pm
by scottwilkerson
Kahlid74 wrote:Thanks @Scottwilkerson that fixed it.

Can I ask, where would I have known to do that? Did I miss a tutorial or something else that showed me how to do that? I feel like a dolt for missing such an easy config option.
Usually it is on by default but might have gotten unchecked in the installation process

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Glad to hear it is resolved.

Locking thread