譬如我在本机
/www/nagios/etc/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
}
__________________________________________
但是我-v 检测 告诉我
Error: Template 'test' specified in host definition could not be not found (config file '/opt/nagios/etc/objects/test.cfg', starting on line 1)
咨询一下是什么原因..检测不通过.是端口冲突吗?
咨询一下nagios的问题..
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 11
- 注册时间: 2009-05-16 14:05
- xiaomao101
- 帖子: 474
- 注册时间: 2006-04-05 18:12
- 联系:
Re: 咨询一下nagios的问题..
I think nagios will look into /opt/nagios/etc/objects/ to find the config file test.cfg, just like says in the error msg.
-> Template 'test' specified in host definition could not be not found (config file '/opt/nagios/etc/objects/test.cfg', starting on line 1)
So you should change "cfg_file=/www/nagios/etc/objects/test.cfg" to "cfg_file=/opt/nagios/etc/objects/test.cfg"
And then move /www/nagios/etc/objects/test.cfg to /opt/nagios/etc/objects/test.cfg
Reload your nagios service and check error msg.
-> Template 'test' specified in host definition could not be not found (config file '/opt/nagios/etc/objects/test.cfg', starting on line 1)
So you should change "cfg_file=/www/nagios/etc/objects/test.cfg" to "cfg_file=/opt/nagios/etc/objects/test.cfg"
And then move /www/nagios/etc/objects/test.cfg to /opt/nagios/etc/objects/test.cfg
Reload your nagios service and check error msg.
-
- 帖子: 11
- 注册时间: 2009-05-16 14:05
Re: 咨询一下nagios的问题..
你说的我也尝试过..也是提示一样的错误..
除了修改naigos.cfg 和创建 /objects下的cfg文件外?还需要修改别的文件吗?
除了修改naigos.cfg 和创建 /objects下的cfg文件外?还需要修改别的文件吗?
- xiaomao101
- 帖子: 474
- 注册时间: 2006-04-05 18:12
- 联系:
-
- 帖子: 3
- 注册时间: 2011-12-22 22:42
Re: 咨询一下nagios的问题..
对于那些外国产品我有时侯也用不习惯,就是英文不太会啊,还有有些配置不简单的,所以我建议你还
是用国内的软件吧,比如说那个美信CreCloud的(www.mxsoft.com),中文的,安装简单,方便,还是
免费的
是用国内的软件吧,比如说那个美信CreCloud的(www.mxsoft.com),中文的,安装简单,方便,还是
免费的