您的位置:首页 > 其它

cacti无图无数据等常见问题排查-转载

2014-11-27 14:24 447 查看
http://www.crazycen.com/linux/1158.html

装过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

通过以上的检查,一般问题都是可以解决的!

===================================================
http://17610376.blog.51cto.com/366886/377114
cacti 没有图像 排错
2010-08-17 14:39:05
标签:cacti 职场 休闲 没有图像
1. 首先检查一下rra/下面,有没有数据,如果没有检查rra/ log/的拥有者是不是cactiuser
2. snmpwalk -v 2c -c public ServerIP if 用来测试被控对象(serverIP)是否开启了SNMP



3. snmpwalk -v 2c ServerIP -c public .1.3.6.1.4.1.2021.10.1.3 查看被控端是否有CPU


载的数据返回
4. /usr/local/bin/php /home/wwwroot/cacti/poller.php 用来测试PHP是否可以采集到数


。如果上面的都正确,但这步出错,很有可能是PHP配置的问题,或开启了SuLinux。
5. 如果按第2步snmpwalk能采集到数据,但第3步无法采集,可能是PHP设置的问题,修改
PHP.ini,很有可能是PHP权限问题。如果第4步正常而无法显示图,则可能是rra/ log/ 的
Owner不对
6. #crontab -e
*/5 * * * * /usr/local/php/bin/php /usr/local/apache/htdocs/cacti/poller.php >

/dev/null 2>&1
//每5分钟自动执行一次数据
注意:如果执行没成功是模式没有执行

或者运行一下该命令看rra文件夹是否有数据
# /usr/local/php/bin/php /usr/local/apache/htdocs/cacti/poller.php
查询模式crond的
[root@localhost bin]# chkconfig --list| grep cron
anacron 0:off 1:off 2:on 3:off 4:on 5:on 6:off
crond 0:off 1:off 2:on 3:off 4:on 5:on 6:off
[root@localhost bin]# chkconfig crond on //更改模式为启动计划任务
[root@localhost bin]# chkconfig --list| grep cron
anacron 0:off 1:off 2:on 3:off 4:on 5:on 6:off
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:of

############################################
http://hi.baidu.com/arongdy/blog/item/976582af9ce866c47cd92af6.html
使用Cacti时常见的问题集
2009年05月21日 星期四 11:08

cacti登录密码忘记解决方法

如果是admin 的密码丢失,id = 1;其他用户以此类推。

进入mysql
mysql> show databases;
mysql> use cacti;
mysql> show tables;
mysql> update user_auth set password=md5("newpassword") where id='1';

新的cacti密码就是newpassword了~~

以前自己曾经解决的,当时自己记住了,过了好长时间,重新在新的机器上安装cacti的时候

,却忘记提前修改,导致一些不必要的麻烦。

帖出来希望对自己或者对大家有帮助

1、一般说来,图片的流量统计描述都是 |host_description| - Traffic - |query_ifName|

按照这个形式来描述的,对于华为的设备,Gi显示成GigabitEthernet,可能导致后面的模块

号,端口好无法显示。如 GigabitEthernet4/3/2显示成GigabitEthernet,

解决办法:

Console -> Settings -> Visual -> Maximum Field Length: 默认 15,我修改成30就OK了。

The maximum number of characters to display for a data query field.

2、对于Traffic 大于800Mbits/s的无法显示问题:
在创建graph前修改 Data Templates -> Interface Traffic -> 1: traffic_in -> Maximum

Value Use Per-Data Source Value 默认是100000000 后面再添 几个0就OK了,同样 2:

traffic_out也要修改哦,最好在使用new graph创建新的graph之前修改后,否则之后修改会

有一定的麻烦,甚至无法正常工作。

3、以前都是直接下载tar.gz源代码包安装的,按照readme就可以搞定一切。目前在FC4下可

以直接通过yum instal cacti就安装完成,安装后却不知道怎么使用,也不知道安装到什么

地方了,怎么让cacti工作。

首先了解rpm包安装了那些有用的文件:

rpm程序把cacit的php文件放到/usr/share/cacti目录下。

在/etc/httpd/conf.d/cacit.conf

==============================

#

# Cacti: An rrd based graphing tool

#

Alias /cacti /usr/share/cacti

Order Deny,Allow

Deny from all

Allow from 127.0.0.1

==============================

在apache的配置里面只允许localhost访问/cacti这个虚拟目录。

[root@elm ~]# cd /etc/cron.d

[root@elm cron.d]# more cacti

*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

[root@elm cron.d]#

定期执行程序的cron配置。

下面介绍如何让cacti工作:

首先,配置数据库:

[root@elm local]# cd /usr/share/doc/cacti-0.8.6h/

[root@elm cacti-0.8.6h]# ls

cacti.sql docs LICENSE README

[root@elm cacti-0.8.6h]# mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 312 to server version: 4.1.16

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database cacti_test;

Query OK, 1 row affected (0.12 sec)

mysql> \q

Bye

[root@elm cacti-0.8.6h]# mysql cacti_test < cacti.sql

修改cacit的配置文件:

[root@elm cacti-0.8.6h]# cd /usr/share/cacti/include/

[root@elm include]# cat db.php
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  cacti 有图无数据