cacti安装FAQ

cacti 不能生成rrd文件

描述

手动执行:php /usr/local/apache/htdocs/cacti/poller.php时,可以看到如下输出

  05/31/2009 10:29:36 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
05/31/2009 10:29:36 AM - SYSTEM STATS: Time:292.5544 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3
DataSources:13 RRDsProcessed:0
 
Warning: pclose(): 57 is not a valid stream resource in /usr/local/apache/htdocs/cacti/lib/rrd.php on line 47


查看cacti日志,发现都是mysql语句:

  05/31/2009 10:29:36 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output,time,poller_output.local_data_id,
poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where
(poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"

05/31/2009 10:29:36 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id =
0"


备注: 05/31/2009 10:29:36 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "selectpoller_output.output,time,poller_output.local_data_id,poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where(poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"

我发现是因为poller_output这张表在库中无法被找到,所以报错,需要重新跑一次这张表有关的脚本

解决方案

  • 首先确保Mysql是没有问题的,mysql出现的问题还是很多的,比如:权限的问题。
建议安装 Navicat,图像化界面操作,方便,
这个是 范堡 推荐给我的!很好用
还有就是每次都要确保PHP的路径是正确的,有时候会出现找到了路径,但是路径不对的情况。否则也会出现上述情况。
  • windows下面要注意安装perl,否则生成rrd文件会有问题。

你可能感兴趣的:(cacti安装FAQ)