Page 1 of 2

Unknown status (NClient++)

Posted: Mon Mar 02, 2015 7:28 am
by ryanam
Hi,

I recently decided to monitor a few core systems with Nagios. The systems are Windows 2008 R2 servers with NSClient++ installed. I followed as much documentation as I could and managed to get Nagios to get everything it needs from the first server.

The other 3 are missing the CPULOAD and USEDDISKSPACE checks. They're just UNKNOWN with status information of 'usage:'.

Below are images of a screenshot of the UI and of the service definition for CPULOAD for all servers. The NClient++ ini file for the all servers are identical with passwords and IPs in place.

Interestingly, on the Nagios server (Centos7) the below command provides the check information which should be on the nagios page but is instead replaced by UNKNOWN.

Code: Select all

/usr/local/nagios/libexec/check_nt -H 192.168.102.4 -p 12489 -s <password>-v CPULOAD -w 80 -c 90 -l 5,80,90,10,80,90
http://postimg.org/image/s2uzexwz7/

http://postimg.org/image/wby58qk91/

Any pointers would be most appreciated :)

Re: Unknown status (NClient++)

Posted: Mon Mar 02, 2015 10:03 am
by jdalrymple
I wonder if there is a problem with your $HOSTADDRESS$ macro. Did you define an address parameter for the host objects of the broken 3 servers?

Re: Unknown status (NClient++)

Posted: Mon Mar 02, 2015 10:09 am
by ryanam
Here are the definitions for all of the servers... is that what you meant?

http://postimg.org/image/aarzi8u4t/

Re: Unknown status (NClient++)

Posted: Mon Mar 02, 2015 11:31 am
by jdalrymple
From what I can see it should be working. Have you modified your commands.cfg at all, or is it still using the predefined check_nt directive?

Re: Unknown status (NClient++)

Posted: Mon Mar 02, 2015 11:37 am
by ryanam
Still using the pre-defined checks... It's really weird especially as I can type the command and get the metric from the command line.. Even if I could find something to give me information as to why the check result is UNKNOWN. Nagios.log doesn't even show any further information... just the UNKNOWN check result.

Re: Unknown status (NClient++)

Posted: Mon Mar 02, 2015 12:10 pm
by jdalrymple
Just for troubleshooting purposes, can you change the host definition of shinersq102 so that it has the same hostaddress as shinerctx01.

There is no doubt that this will NOT solve your issue, however it might tell us if the problem is related specifically to the Windows server and not the host, command and service definitions. My guess from the output is that it is something malformed coming out of the service definitions, but as I said, everything looks good to me.

Re: Unknown status (NClient++)

Posted: Mon Mar 02, 2015 12:37 pm
by ryanam
I changed the host address of shinersql02 to match shinerctx01 and it displayed all the expected service checks of shinerctx01 except with the disk usage and CPU load checks still showing as UNKNOWN.

Hmmm... I took various snapshots of this server at each stage so I guess it'll be a case of going through each one.

Re: Unknown status (NClient++)

Posted: Mon Mar 02, 2015 12:48 pm
by jdalrymple
That definitely does tell us that the problem is with the Nagios configurations.

Do you know how to do command expansion in the core interface?

Under System choose Configuration
Choose Services from the dropdown and hit Continue
Find a failing host/service and click the link in the "Check Command" column

Take a look there and see if the command expansion looks proper. this one truly has me baffled at this point.

Re: Unknown status (NClient++)

Posted: Mon Mar 02, 2015 1:09 pm
by ryanam
Thanks for your help so far. I'm at home now so I'll reply to this when I'm in the office again tomorrow.

Re: Unknown status (NClient++)

Posted: Mon Mar 02, 2015 2:40 pm
by jolson
Sounds good - let us know. Thanks.