Configuring Nagios to monitor windows machine
-
Noctis0791
- Posts: 58
- Joined: Wed Oct 09, 2013 3:41 pm
Re: Configuring Nagios to monitor windows machine
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
Thanks again,
Arnel
- Attachments
-
windows.cfg.txt- (1.04 KiB) Downloaded 238 times
-
templates.cfg.txt- (1.34 KiB) Downloaded 232 times
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Configuring Nagios to monitor windows machine
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.
-l C -w 80 -c 95
Where C = Drive letter, w = Warning threshold, and c = Critical threshold.
-
Noctis0791
- Posts: 58
- Joined: Wed Oct 09, 2013 3:41 pm
Re: Configuring Nagios to monitor windows machine
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
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
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Configuring Nagios to monitor windows machine
Can you share your command definition for check_nt?
-
Noctis0791
- Posts: 58
- Joined: Wed Oct 09, 2013 3:41 pm
Re: Configuring Nagios to monitor windows machine
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
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
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Configuring Nagios to monitor windows machine
Run the following from the command line, what is returned?
You do have a C drive on that system correct? It's not networked storage?
Code: Select all
/usr/local/nagios/libexec/check_nt -H <windows.address.> -v USEDDISKSPACE -l C -w 80 -c 90-
Noctis0791
- Posts: 58
- Joined: Wed Oct 09, 2013 3:41 pm
Re: Configuring Nagios to monitor windows machine
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.
Thanks,
Arnel
Thanks,
Arnel
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Configuring Nagios to monitor windows machine
Ah looks like your running Ubuntu with a GUI, try this one:
Or the location that the plugins were installed to.
Code: Select all
/usr/lib/nagios/plugins/check_nt -H <windows.address.> -v USEDDISKSPACE -l C -w 80 -c 90-
Noctis0791
- Posts: 58
- Joined: Wed Oct 09, 2013 3:41 pm
Re: Configuring Nagios to monitor windows machine
Yes, running on Ubuntu with GUI.
I got this result from the above command.
CRITICAL - Socket timeout after 10 seconds
Thanks,
Arnel
I got this result from the above command.
CRITICAL - Socket timeout after 10 seconds
Thanks,
Arnel
Re: Configuring Nagios to monitor windows machine
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:
2. Is port 12489 open on the remote windows box?
3. Can you ping the remote host from the nagios server?
Code: Select all
/usr/lib/nagios/plugins/check_nt -H <windows.address.> -s <password> -v USEDDISKSPACE -l C -w 80 -c 90Code: Select all
nmap -p 12489 <windows.address>Code: Select all
ping <windows.address>Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.