nagios调试配置文件

当修改了配置文件后,出现如下错误的时候:

Running configuration check… CONFIG ERROR! ?Check your Nagios configuration.

不要手足无措,我们应该静下来调试下,看到底什么地方写的问题

[root@iZ28hwoqgigZ etc]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 3.2.0Copyright (c) 2009 Nagios Core Development Team and Community ContributorsCopyright (c) 1999-2009 Ethan GalstadLast Modified: 08-12-2009License: GPL

Website: http://www.nagios.orgReading 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/objects/hosts’…Processing object config file ‘/usr/local/nagios/etc/objects/hosts/localhost.cfg’…Error: Invalid service object directive ‘ervice_description‘.Error: Could not add object property in file ‘/usr/local/nagios/etc/objects/hosts/localhost.cfg’ on line 93.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 validdirectives and data defintions. If you are upgrading from a previousversion of Nagios, you should be aware that some variables/definitionsmay have been removed or modified in this version. Make sure to readthe HTML documentation regarding the config files, as well as the‘Whats New’ section to find out what has changed.

通过上面的调试,已经有了明确的结果就是localhost.cfg的93行,在写server_description的时候,少了个“s”

nagios调试配置文件

相关文章:

你感兴趣的文章:

标签云: