# 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 defaultvaluesfrom a template 从template中继承相关监控参数
host_name BR56 ; The name we're giving to this host 主机名称
alias ZWBR56 ; A longer name associated with the host 别名
address 192.168.0.56 ; IP address of the host IP地址
}
# Windows host definition template - This is NOT a real host, just a template!
define host{ name windows-server ; The nameof this hosttemplate
use generic-host ; Inherit defaultvaluesfrom thegeneric-hosttemplate
check_period 24x7 ; Bydefault, Windows servers are monitoredround the clock
check_interval 5 ; Actively check the server every 5 minutes
retry_interval 1 ; Schedule hostcheck retries at 1 minute intervals
max_check_attempts 10 ; Checkeach server 10 times(max)
check_command check-host-alive; Default command tocheck ifservers are "alive"
notification_period 24x7 ; Send notification outatanytime - dayor night
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications forspecifichost states
contact_groups admins ; Notifications get sent to the admins bydefault
hostgroups windows-servers ; Host groups that Windows servers should be a member of
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
Nagios Core 4.0.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 04-29-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Could not find any host matching 'winserver' (config file '/usr/local/nagios/etc/objects/windows.cfg', starting on line 138)
Error: Failed to expand host list 'winserver' for service 'Explorer' (/usr/local/nagios/etc/objects/windows.cfg:138)
Error processing object config files!
***> 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.
Nagios Core 4.0.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 04-29-2014
License: GPL