日期:2014-05-16  浏览次数:21604 次

Nagios 报错 specified in host definition could not be not found
一 我在nagios.cfg 里添了一条

cfg_file=/www/nagios/etc/objects/test.cfg


我test.cfg只写了
__________________________________________
define host{
use test
host_name testname
alias testname
address xxx.xxx.xxx.xxx //本机的ip地址
}


define service{
use test
host_name testname
service_description CPU Load
check_command check_nrpe!check_cpu
}
__________________________________________
在hosts.cfg中加了
define host {
       host_name                  test
       alias                      test
       address                    192.168.1.100
       contact_groups             sagroup //多个联系组用逗号分隔,数据来源于contactgroups.cfg
       check_command              check-host-alive
       max_check_attempts         5
       notification_interval      10    //值可调,大小什么值合适需自己测定
       notification_period        24x7
       notification_options        d,u,r
       }
然后检查就报错了。请问还有什么地方要配置啊

------解决方案--------------------
在template里建立一个test模板