Page 2 of 3

Re: Configuring Nagios to monitor windows machine

Posted: Mon Nov 04, 2013 5:02 pm
by Noctis0791
Thanks sreinhardt. That's what I did and the duplicate issue seems to be sorted now. But I still got warnings for this box that I would like to monitor (see attached). Here's my templates.cfg and windows.cfg. Any Ideas what could be wrong on my configurations?

Thanks again,

Arnel

Re: Configuring Nagios to monitor windows machine

Posted: Mon Nov 04, 2013 5:55 pm
by slansing
You will have to pass the "-l" argument through those commands. For instance when checking disc with check_nt you will need to pass something similar to this:

-l C -w 80 -c 95

Where C = Drive letter, w = Warning threshold, and c = Critical threshold.

Re: Configuring Nagios to monitor windows machine

Posted: Tue Nov 05, 2013 8:23 am
by Noctis0791
Thanks slansing. But it looks like I already have those specified in my windows.cfg. Can you take a look on my commands below just to confirm if they were specified correctly? Thank You!

define host{
use windows-server
host_name Test-PC
alias Test-PC
address 192.168.100.25
}

define service{
use generic-service
host_name Test-PC
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}

define service{
use generic-service
host_name Test-PC
service_description Uptime
check_command check_nt!UPTIME
}

define service{
use generic-service
host_name Test-PC
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
define service{
use generic-service
host_name Test-PC
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}

define service{
use generic-service
host_name Test-PC
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l C -w 80 -c 90
}

Regards,

Arnel

Re: Configuring Nagios to monitor windows machine

Posted: Tue Nov 05, 2013 10:35 am
by slansing
Can you share your command definition for check_nt?

Re: Configuring Nagios to monitor windows machine

Posted: Tue Nov 05, 2013 10:52 am
by Noctis0791
Hi slansing,

Here's my command definition for check_nt.

# 'check_nt' command definition
define command {
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -v $ARG1$ $ARG2$
}

# 'check_nscp' command definition
define command {
command_name check_nscp
command_line /usr/lib/nagios/plugins/check_nt -H $HOSTADDRESS$ -v $ARG1$ $ARG2$
}


also tried it this way but with the same result.

# 'check_nt' command definition
define command {
command_name check_nt
command_line /usr/lib/nagios/plugins/check_nt -H $HOSTADDRESS$ -v $ARG1$ $ARG2$
}

Thank You,

Arnel

Re: Configuring Nagios to monitor windows machine

Posted: Tue Nov 05, 2013 11:00 am
by slansing
Run the following from the command line, what is returned?

Code: Select all

/usr/local/nagios/libexec/check_nt -H <windows.address.> -v USEDDISKSPACE -l C -w 80 -c 90
You do have a C drive on that system correct? It's not networked storage?

Re: Configuring Nagios to monitor windows machine

Posted: Tue Nov 05, 2013 11:17 am
by Noctis0791
I got this result from that command. Yes, this machine only has a single drive which is the C drive. Its not a network share.
check_nt from terminal.PNG
Thanks,

Arnel

Re: Configuring Nagios to monitor windows machine

Posted: Tue Nov 05, 2013 11:52 am
by slansing
Ah looks like your running Ubuntu with a GUI, try this one:

Code: Select all

/usr/lib/nagios/plugins/check_nt -H <windows.address.> -v USEDDISKSPACE -l C -w 80 -c 90
Or the location that the plugins were installed to.

Re: Configuring Nagios to monitor windows machine

Posted: Tue Nov 05, 2013 12:10 pm
by Noctis0791
Yes, running on Ubuntu with GUI.

I got this result from the above command.

CRITICAL - Socket timeout after 10 seconds

Thanks,

Arnel

Re: Configuring Nagios to monitor windows machine

Posted: Tue Nov 05, 2013 5:34 pm
by abrist
1. Do you have a password set in the remote system's nsclient config? If so, you will need to declare it in your check:

Code: Select all

/usr/lib/nagios/plugins/check_nt -H <windows.address.> -s <password> -v USEDDISKSPACE -l C -w 80 -c 90
2. Is port 12489 open on the remote windows box?

Code: Select all

nmap -p 12489 <windows.address>
3. Can you ping the remote host from the nagios server?

Code: Select all

ping <windows.address>