nagios+cacti+nrpe+nconf整合最后报错解决

在web页面点击Generate Nagios config后出现了这个错误提示

Generating config:
[ Initializing NConf perl-API (library version 0.2, written by A. Gargiulo) ]
[ Copyright (c) 2006-2009 Sunrise Communications AG, Zurich, Switzerland   ]


Running syntax check:

  Default_collector: Error generating config
--------------------------------------------------------------------------------
Nagios Core 3.2.1
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-09-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Error: Cannot open main configuration file '/usr/local/apache/htdocs/nconf/temp/test/Default_collector.cfg' for reading!
  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.



Deployment not possible due to errors in configuration.

 

 

 

笔者的环境,使用的rhel5.8 32,及光盘源安装的 http和php,

但是mysql却是编译安装的最新版,

因此nconf的脚本使用的perl无法和mysql交互导致,

因此安装 perl-DBD-MySQL 即可解决: # yum install perl-DBD-MySQL -y