`
welcome66
  • 浏览: 397276 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

icinga配置文件出错检查办法

阅读更多

    当使用icinga进行自定义插件时,需要修改commands.cfg和host.cfg文件。修改完文件,需要重启icinga,有时候会出错,如下:

[root@test libexec]# service icinga restart
Running configuration check...CONFIG ERROR! Restart aborted. See /usr/local/icinga/var/icinga.chk for details.

    这时需要查看问题到底出现在哪里,查看配置出错信息的方法如下:

[root@test icinga]# /usr/local/icinga/bin/icinga  /usr/local/icinga/etc/icinga.cfg 

Icinga 1.11.5
Copyright (c) 2009-present Icinga Development Team (http://www.icinga.org)
Copyright (c) 2009-2013 Nagios Core Development Team and Community Contributors
Copyright (c) 2009-2013 icinga-cn中æåç»

Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 06-20-2014
License: GPL

Warning: Duplicate definition found for command 'check-snmp-perl-memory' (config file '/usr/local/icinga/etc/objects/commands.cfg', starting on line 295)
Error: Could not add object property in file '/usr/local/icinga/etc/objects/commands.cfg' on line 296.
Bailing out due to one or more errors encountered in the configuration files. Run Icinga from the command line with the -v option to verify your config before restarting. (PID=15091)

     这里就可以明确看到出错的具体原因,根据原因查找问题所在,解决即可。

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics