linux还是菜鸟,这帖子应该是发这一块没错吧?
大概情况是这样。ubuntu配置好了Nagios,并且可以监控自己。
现在想监控下windows的机子,于是在windows的机子上安装了NSClien++插件,并且配置好了,服务开启,监听正常。
再回到ubuntu的机子上,于是悲剧了。
代码: 全选
/var/log/nagios3# service nagios3 restart
* Restarting nagios3 monitoring daemon nagios3
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/etc/nagios3/commands.cfg'...
Processing object config directory '/etc/nagios-plugins/config'...
Processing object config file '/etc/nagios-plugins/config/users.cfg'...
Processing object config file '/etc/nagios-plugins/config/mailq.cfg'...
Processing object config file '/etc/nagios-plugins/config/procs.cfg'...
Processing object config file '/etc/nagios-plugins/config/disk-smb.cfg'...
Processing object config file '/etc/nagios-plugins/config/load.cfg'...
Processing object config file '/etc/nagios-plugins/config/dummy.cfg'...
Processing object config file '/etc/nagios-plugins/config/radius.cfg'...
Processing object config file '/etc/nagios-plugins/config/telnet.cfg'...
Processing object config file '/etc/nagios-plugins/config/nt.cfg'...
Warning: Duplicate definition found for command 'check_nt' (config file '/etc/nagios-plugins/config/nt.cfg', starting on line 6)
Error: Could not add object property in file '/etc/nagios-plugins/config/nt.cfg' on line 7.
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.
* errors in config!
[fail]
这个文件很是纠结啊,我找网上的照抄无数个版本都不对。
此文件我是这样定义的。
代码: 全选
# 'check_nt' command definition
define command {
command_name check_nt
command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -p 12489 -v '$ARG1$' '$ARG2$'
}
# 'check_nscp' command definition
define command {
command_name check_nscp
command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -p 12489 -v '$ARG1$'
}
求指导···多谢!