1.Can’t locate extUtils/makemaker.pm
安装perl后解决.
yum -y install perl-CPAN
 
图片不能显示
总结cacti图形采集正确,却无法实现部分监控图像的问题
有些时候,使用的cacti出现莫名其妙的问题,网卡图形无法显示,其他图形正常显示,
在确保snmp数据采集正常的情况下,总结如下
1.--console-----system utilities -->Rebuild poller cache
2.系统时间不准确,重新设置时间
3.图像没有生成,运行#/usr/bin/php /srv/www/htdocs/cacti/poller.php --force
4.权限问题,修改权限#chmod 777 -R /srv/www/htdocs/cacti/rra
5.数据库表有损坏,修复#mysqlcheck -ao cacti --auto-repair -uroot -p
6.重启snmpd服务#service snmpd restart
7.cacti的日志太大,清理日志
8.查看日志,---console-----System Utilities---View Cacti log File"
一般查看日志,会出现大量数据采集失败的警告
 
 
以上几种方法,需要自行一一测试,出现问题的的情况有很多种,但解决问题的思路和方法无外乎上面几种,
此文只起到抛砖引玉的作用
不能显示文字
查看日志
装字体
一、软件包
 
a) cacti-0.8.7g.tar.gz
 
b) net-snmp-5.2.6.tar.gz
 
c) rrdtool-1.4.5.tar.gz
net-snmp-5.1.2-11.EL4.7
net-snmp-libs-5.1.2-11.EL4.7
net-snmp-devel-5.1.2-11.EL4.7
net-snmp-utils-5.1.2-11.EL4.7
net-snmp-perl-5.1.2-11.EL4.7
 
httpd
mysql mysql-server php-mysql php
库文件
zib libpng freetype fontconfig gd libxml2  cairo-devel libxml2-devel pango pango-devel
 
二、安装步骤
 
a) 首先安装配置好LAMP环境
 
b) Tar zxvf rrdtool-1.4.5.tar.gz
 
c) ./configure --prefix=/usr/local/rrdtool --disable-tcl
make
make install
d) ln -s /usr/local/rrdtool/bin/* /usr/local/bin/
e) 执行rrdtool看是否安装正确
 
f) Tar zxvf net-snmp-5.2.6.tar.gz
 
g) ./configure --prefix=/usr/local/net-snmp --enable-developer
make
make install
h) ln -s /usr/local/net-snmp/bin/* /usr/local/bin
i) cp EXAMPLE.conf /usr/local/net-snmp/share/snmp/snmpd.conf
j) /usr/local/net-snmp/sbin/snmpd //启动snmpd
 
k) Tar zxvf cacti-0.8.7g.tar.gz
 
l) mv  cacti-0.8.7i /var/www/cacti
 
m) vim /var/www/cacti/include/config.php
$database_type = "mysql";  
 
$database_default = "cacti";  
 
$database_hostname = "localhost";  
 
$database_username = "cacti";  
 
$database_password = "cacti";  
 
n) vim /var/www/cacti/include/global.php
 
$database_type = "mysql";  
 
$database_default = "cacti";  
 
$database_hostname = "localhost";  
 
$database_username = "cacti";  
 
$database_password = "cacti";  
 
o) useradd cacti
 
p) groupadd cacti
 
q) chown –R cacti:cacti/var/www/cacti/rra
 
r) chown –R cacti:cacti /var/www/cacti
设置没5分钟收集一次数据
crontab -e
*/5 * * * * cacti php /var/www/cacti/poller.php >/dev/null 2>&1
s) /usr/local/mysql/bin/mysql –uroot –p
 
t) Mysql>create database cacti;
 Mysql> use cacti;
u) Mysql> grant all on cacti.* to cacti@localhost identified by “cacti”;
 
v) Mysql>flush privileges;
 
w) Cd /var/www/cacti
 
x)导入cacti数据 
/usr/local/mysql/bin/mysql –ucacti  –p cacti < cacti.sql;
配置httpd配置文件
 
 
y) 访问http://localhost/cacti默认用户名admin.密码admin
 
 Redhat Cacti安装配置 成功!
 
 
 net-snmp 配置
agentAddress  udp:161
rocommunity public
 
 
 
 
<2011-12-29 上午10时07分41秒 CST> <Critical> <Health> <BEA-310003> <Free memory
in the server is 4,128,744 bytes. There is danger of OutOfMemoryError>