# Define the switch that we'll be monitoring
define host{
use generic-switch ; Inherit default values from a template
host_name linksys-srw224p ; The name we're giving to this switch
alias Linksys SRW224P Switch ; A longer name associated with the switch
address 10.46.0.15 ; IP address of the switch
hostgroups switches ; Host groups this switch is associated with
}
###############################################################################
###############################################################################
#
# HOST GROUP DEFINITIONS
#
###############################################################################
###############################################################################
# Create a new hostgroup for switches
define hostgroup{
hostgroup_name switches ; The name of the hostgroup
alias Network Switches ; Long name of the group
members nagiosadmin ;
}
////////////log message
usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg
Nagios 3.0rc2
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 01-29-2008
License: GPL
Reading configuration data...
Error: Could not find any host matching 'nagiosadmin' (config file '/usr/local/nagios/etc/objects/switch.cfg', starting on line 45)
Error: Could not expand member hosts specified in hostgroup (config file '/usr/local/nagios/etc/objects/switch.cfg', starting on line 45)
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.