1.添加thold插件时报错
You are running MySQL in Strict Mode, which is not supported by Thold.
解决方法:
mysql> SET @@GLOBAL.sql_mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";
Query OK, 0 rows affected (0.00 sec)
mysql>
2.cacti添加主机报错
解决方法:
(1).在被监控主要上修改snmpd.conf配置文件
[root@web01 ~]# vim /etc/snmp/snmpd.conf
syslocation Server Room
syscontact Sysadmin (root@localhost)
rocommunity public 127.0.0.1
agentaddress 161
rocommunity public
rwcommunity private
trapsink 本机IP地址 public 162
[root@web01 ~]# vim /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m udp -p udp --dport 161 -s 180.178.52.82 -j ACCEPT
[root@web01 ~]# /etc/init.d/snmpd restart
Stopping snmpd: [FAILED]
Starting snmpd: [ OK ]
[root@web01 ~]# /etc/init.d/iptables restart
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
[root@web01 ~]#
(2).在cacti主机测试是否连通snmp服务
[root@db02 rra]# snmpwalk -c public -v 2c 被监控主机 --会输出很多信息
SNMPv2-MIB::sysDescr.0 = STRING: Linux web01 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (15334) 0:02:33.34
SNMPv2-MIB::sysContact.0 = STRING: Sysadmin (root@localhost)
................................................
3.cacti监控不出图
(1).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