Chinaunix首页 | 论坛 | 博客
  • 博客访问: 304346
  • 博文数量: 80
  • 博客积分: 1933
  • 博客等级: 上尉
  • 技术积分: 915
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-09 08:43
个人简介

高龄IT运维工程师

文章分类
文章存档

2023年(5)

2021年(3)

2020年(1)

2019年(2)

2018年(3)

2017年(3)

2016年(5)

2014年(3)

2013年(2)

2012年(11)

2011年(12)

2010年(30)

分类: 系统运维

2013-07-16 15:09:58

当你的nagios出现穿上问题的时候,Error in configuration file ‘/usr/local/nagios/etc/objects/201.cfg’ – Line 25 (NULL value),这个问题。空值

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/objects/localhost.cfg

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:
Reading configuration data...
Error in configuration file '/usr/local/nagios/etc/objects/localhost.cfg' - Line 21 (NULL value)
   Error processing main config file!

 

***> The name of the main configuration file looks suspicious...

     Make sure you are specifying the name of the MAIN configuration file on
     the command line and not the name of another configuration file.  The
     main configuration file is typically '/usr/local/nagios/etc/nagios.cfg'

***> 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.
通过这个命令

 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

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:
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 file '/usr/local/nagios/etc/objects/localhost.cfg'...
Error: Unexpected token or statement in file '/usr/local/nagios/etc/objects/localhost.cfg' on line 21.
   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.

显示出了locaost.cfg这个文件的21行有错误。那就自己去改吧。改好 就能重nagios了,你的nagios就能启来了。

 

阅读(6137) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~