/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] 根据上面报错,我找到这个文件'/etc/nagios-plugins/config/nt.cfg' 这个文件很是纠结啊,我找网上的照抄无数个版本都不对。 此文件我是这样定义的。
代码:
# '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$' } 实在不清楚哪里错了,这个文件都被我改烂了。 求大神指教!