Chinaunix
标题:
Nagios 3.x添加新的网络设备配置文件出错
[打印本页]
作者:
zenglingping
时间:
2008-12-20 19:27
标题:
Nagios 3.x添加新的网络设备配置文件出错
我的配置文件是:
# cat etc/switches/hqcore1.cfg
define host {
host_name HQ-Core1
alias 3COM 5500-EI
address 192.168.0.1
contact_groups Core-Switches
check_command check-host-alive
max_check_attempts 5
notification_interval 3
notification_period 24x7
notification_options d,u,r
}
复制代码
检查配置文件总出错,郁闷:
# nagios -v switches/hqcore1.cfg
Nagios 3.0.6
Copyright (c) 1999-2008 Ethan Galstad ([url]http://www.nagios.org[/url])
Last Modified: 12-01-2008
License: GPL
Reading configuration data...
Error in configuration file '/usr/local/nagios/etc/switches/hqcore1.cfg' - Line 1 (NULL value)
***> The name of the main configuration file looks suspicious...
Make sure you are specifying the name of the MAIN configuration file on
the command line and not the name of another configuration file. The
main configuration file is typically '/usr/local/nagios/etc/nagios.cfg'
***> 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.
复制代码
作者:
ssffzz1
时间:
2008-12-20 21:15
hqcore1.cfg' - Line 1 (NULL value)
不过对这个软件实在是不懂。你根据提示检查一下,另外不会是在WIN下编辑的文件吧。
作者:
zenglingping
时间:
2008-12-22 08:59
标题:
回复 #2 ssffzz1 的帖子
不是的,是通过ssh直接连接到linux下做的,还要花的时间研究一下。。。谢谢!
作者:
末路狂奔
时间:
2008-12-25 15:20
嘎嘎,我这也是那德行,3.X的不知道怎么搞的.动不动就报define host {出错....,即使不是那的错..也报..
我的是不能把所有的主机加到一个组中...
作者:
deargentle
时间:
2009-10-14 10:47
应该是这个nagios.cfg
nagios -v nagios.cfg
不要检查具体配置文件,要检查主配置文件
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2