Hello all–
I have Nagios 3.0b4 runnig on an Ubuntu 7 box. I followed the quickstart guide and I’m able to monitor the few printers I have set up so far and the local host.
I installed and configured NSClient++ 0.2.7 on my machine and followed the quickstart guide to set up Nagios to monitor my machine.
When I run the verify switch for Nagios (/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg) to make sure everything’s OK, I get the following:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios 3.0b4
Copyright © 1999-2007 Ethan Galstad (nagios.org)
Last Modified: 09-27-2007
License: GPL
Reading configuration data…
Error: Could not find any hostgroup matching ‘allhosts’ (config file ‘/usr/local/nagios/etc/objects/windows.cfg’, starting on line 25)
Error: Hostgroup has no members (config file ‘/usr/local/nagios/etc/objects/windows.cfg’, starting on line 47)
The problem is, there’s no such line in my windows.cfg file:
more windows.cfg
###############################################################################
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 myPC ; The name we’re giving to this host
alias Joe ; A longer name associated with the host
address 192.168.1.59 ; IP address of the host
}
###############################################################################
###############################################################################
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
host_name myPC
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
host_name myPC
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
host_name myPC
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
Create a service for monitoring
Change the host_name to match the name of the host you defined above
define service{
use generic-service
host_name myPC
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
host_name myPC
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
host_name myPC
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
host_name myPC
service_description Explorer
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
}
I’ve uncommented the ‘cfg_file=/usr/local/nagios/etc/objects/windows.cfg’ line in nagios.cfg
any thoughts?
Thanks,
Joe