Page 1 of 2

Services returning unknown on windows server 2012

Posted: Mon Apr 25, 2016 6:45 am
by SaltyBear
Hi

First i'd like to tell you that this is part of a school assignment where I'm studying to be a network engineer so excuse me if I don't understand any terms you might use to help me.

So basic setup is this:
LAN A:
4 servers 3x windows server 2012, 1x windows 7 client, 1 FW and 1 Nagios monitoring server on ubuntu 14.04
http://imgur.com/a/WFBxC

I am currently succesfully monitoring the windows client and the firewall as the screenshot will show
But both of 2 windows server 2012's give me the same "UNKNOWN" output for CPU Load, Disk space and explorer.exe checks.
As these are properly monitored on the client, I already eliminated the fact that it would be a problem with the plugins themselves.
Does anyone here have an idea why my 2012 servers are both failing to return any statusses for these 3 monitoring services?

Please do ask any further info you might need, I hope the screenshots I have provided will be of help to you.

Thanks.

Re: Services returning unknown on windows server 2012

Posted: Mon Apr 25, 2016 9:46 am
by hsmith
Any logs in C:\Program Files\NSClient++ that may be helpful?

Re: Services returning unknown on windows server 2012

Posted: Mon Apr 25, 2016 10:27 am
by rkennedy
Also, can you post the service definitions for the ones that are failing?

Re: Services returning unknown on windows server 2012

Posted: Mon Apr 25, 2016 9:09 pm
by Box293
For one of the checks that is not working, what output do you get when you test at the command line?

Code: Select all

check_nt -H 192.168.60.2 -p 12489 -v USEDDISKSPACE -l c -w 80 -c 90
or

Code: Select all

check_nt -H 192.168.60.2 -v USEDDISKSPACE -l c -w 80 -c 90
It would be good to see your check_nt command definition.

Re: Services returning unknown on windows server 2012

Posted: Tue Apr 26, 2016 2:30 am
by SaltyBear
This is how I have my check_nt command defined

Code: Select all

define command{
        command_name check_nrpe
        command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
And the service definitions I added in the screenshots I provided, the testclient (Win 7 client) is the one where everything works, the other 2 return me a UNKNOWN error on CPU Load, Disk space on C and Explorer.

This is what I get in the details menu for one of the UNKNOWN values.
http://imgur.com/noOX0Eu

Re: Services returning unknown on windows server 2012

Posted: Tue Apr 26, 2016 2:33 am
by nozlaf
couple of things jump out

testclient - is this your windows 7 machine? its running a much older version of nsclient than the two which have failed

you mention 3 windows servers and 1 windows 7 client but have only shown three things being monitored, is one of your 2012 servers working? if so can you confirm the nsclient version for it?

when you installed nsclient++ on the servers did you do it the same for all three?

Re: Services returning unknown on windows server 2012

Posted: Tue Apr 26, 2016 2:43 am
by SaltyBear
nozlaf wrote:couple of things jump out

testclient - is this your windows 7 machine? its running a much older version of nsclient than the two which have failed

you mention 3 windows servers and 1 windows 7 client but have only shown three things being monitored, is one of your 2012 servers working? if so can you confirm the nsclient version for it?

when you installed nsclient++ on the servers did you do it the same for all three?
Testclient is indeed the windows 7 client, and I currently only installed nagios on 2 of the 3 windows 2012 servers, that is why 1 is missing.
I never noticed testclient is using an older version, as I did them all on the same day I don't understand how this could've happened.
And I did install them the same way, using the GUI installer I got from the official website and then adding them to my ubuntu 14.04 nagios server.

Re: Services returning unknown on windows server 2012

Posted: Tue Apr 26, 2016 4:19 pm
by Box293
SaltyBear wrote:This is how I have my check_nt command defined

Code: Select all

define command{
        command_name check_nrpe
        command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
And the service definitions I added in the screenshots I provided, the testclient (Win 7 client) is the one where everything works, the other 2 return me a UNKNOWN error on CPU Load, Disk space on C and Explorer.

This is what I get in the details menu for one of the UNKNOWN values.
http://imgur.com/noOX0Eu
This is your check_nrpe command definition, not your check_nt command definition. Can you please post your check_nt command definition.

Re: Services returning unknown on windows server 2012

Posted: Fri Apr 29, 2016 2:13 am
by SaltyBear
Whoops I'm sorry

Code: Select all

define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s Azerty1. -v $ARG1$ $ARG2$
}
Azerty1. being the password I put on the nsclient++ on the client/servers

Edit:
I added an ubuntu host and here the same services also return an unknown status but with the following error which the windows servers do not give
"Check_nt: could not parse arguments"

Re: Services returning unknown on windows server 2012

Posted: Fri Apr 29, 2016 12:24 pm
by tgriep
It is hard to see your screen captures but it looks like some of the service definitions are using a number 1 instead of a lower case l
Take a look at that and see if that is the case, if so change the 1 to a l and that should fix it for you.