Windows Check_nt issues
Posted: Tue Jan 07, 2014 4:52 pm
First time Nagios install and setup. No problem with external, passive checks. I am now trying to set up checks for windows machines.
I am able to do a manual check and get good responses, like such:
When these run from the windows.cfg file I get an errors:
DriveSpace gives: missing -l parameters
UPTIME gives: socket timeout after 10 seconds
There are 6 default commands in the windows.cfg file and they all give the "socket timeout error" or "missing -l parameters".
From the windows.cfg file (complete file below):
The original windows.cfg file referenced "windows-server" as the host template to use. I only have the generic-host_nagios2.cfg, so had windows.cfg reference that instead. Could that be the problem, or any other ideas?
Thanks,
~ Tommy
Nagios Output in attachment: Complete copy of windows.cfg:
I am able to do a manual check and get good responses, like such:
Code: Select all
/usr/lib/nagios/plugins/check_nt -H 10.2.1.82 -p 12489 -v USEDDISKSPACE -d SHOWALL -l c
c:\ - total: 59.90 Gb - used: 18.56 Gb (31%) - free 41.34 Gb (69%) | 'c:\ Used Space'=18.56Gb;0.00;0.00;0.00;59.90
Code: Select all
/usr/lib/nagios/plugins/check_nt -H 10.2.1.82 -p 12489 -v UPTIME
System Uptime - 3 day(s) 22 hour(s) 17 minute(s)
DriveSpace gives: missing -l parameters
UPTIME gives: socket timeout after 10 seconds
There are 6 default commands in the windows.cfg file and they all give the "socket timeout error" or "missing -l parameters".
From the windows.cfg file (complete file below):
Code: Select all
define service{
use generic-service
hostgroup_name windows-servers
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}
define service{
use generic-service
hostgroup_name windows-servers
service_description Uptime
check_command check_nt!UPTIME
}
Thanks,
~ Tommy
Nagios Output in attachment: Complete copy of windows.cfg:
Code: Select all
###############################################################################
# WINDOWS.CFG - SAMPLE CONFIG FILE FOR MONITORING A WINDOWS MACHINE
#
# Last Modified: 06-13-2007
#
# NOTES: This config file assumes that you are using the sample configuration
# files that get installed with the Nagios quickstart guide.
#
###############################################################################
###############################################################################
#
# HOST DEFINITIONS
#
###############################################################################
###############################################################################
# Define a host for the Windows machine we'll be monitoring
# Change the host_name, alias, and address to fit your situation
#define host{
# use windows-server ; Inherit default values from a template
# host_name winserver ; The name we're giving to this host
# alias My Windows Server ; A longer name associated with the host
# address 192.168.1.2 ; IP address of the host
# }
define host{
use generic-host ; Inherit default values from a template
host_name off_10.2.1.82_b1
alias Office Off-Site Backup 1
address 10.2.1.82
hostgroups windows-servers ; Host groups this host is associated with
}
###############################################################################
###############################################################################
#
# HOST GROUP DEFINITIONS
#
###############################################################################
###############################################################################
# Define a hostgroup for Windows machines
# All hosts that use the windows-server template will automatically be a member of this group
define hostgroup{
hostgroup_name windows-servers ; The name of the hostgroup
alias Windows Servers ; Long name of the group
}
###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################
# Create a service for monitoring the version of NSCLient++ that is installed
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
hostgroup_name windows-servers
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
# Create a service for monitoring the uptime of the server
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
hostgroup_name windows-servers
service_description Uptime
check_command check_nt!UPTIME
}
# Create a service for monitoring CPU load
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
hostgroup_name windows-servers
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
# Create a service for monitoring memory usage
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
hostgroup_name windows-servers
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}
# Create a service for monitoring C:\ disk usage
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
hostgroup_name windows-servers
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}
# Create a service for monitoring the W3SVC service
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
hostgroup_name windows-servers
service_description W3SVC
check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
}
# Create a service for monitoring the Explorer.exe process
# Change the host_name to match the name of the host you defined above
define service{
use generic-service
hostgroup_name windows-servers
service_description Explorer
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
}