Nagiosの設定はコンフィグファイルを編集することで監視項目の追加などを行いますが、慣れないうちはエラーが出て動作しないことがあります
[root@host1 ~]# /etc/init.d/nagios reload
Running configuration check… CONFIG ERROR! Reload aborted. Check your Nagios configuration.
ログにエラー内容が記録されそうですが、ログには監視項目のOK,NGなどが記録されるだけでした
複数ファイルの編集を行ったあとReloadでエラーが出ると凹みます
で、調べると欲しい情報がありました
№720 Nagios起動時にconfig error
http://centossrv.com/bbshtml/webpatio/720.shtml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
; html-script: false ] [root@host1 ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Nagios Core 3.4.1 Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributo Copyright (c) 1999-2009 Ethan Galstad Last Modified: 05-11-2012 License: GPL Website: http://www.nagios.org Reading configuration data... Read main config file okay... Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'... Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'... Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg' Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'.. Processing object config directory '/usr/local/nagios/etc/servers'... Processing object config file '/usr/local/nagios/etc/servers/server01.cfg'... Processing object config file '/usr/local/nagios/etc/servers/Router.cfg'... Processing object config file '/usr/local/nagios/etc/servers/FreeNAS.cfg'... Error: Could not find any host matching 'esxi' (config file '/usr/local/nag/etc/servers/server01.cfg', starting on line 14) Error: Could not expand members specified in hostgroup (config file '/usr/locnagios/etc/servers/server01.cfg', starting on line 14) 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. |