Cacti有图无流量

jiangjinsai 发布于 2016/06/13 12:15
阅读 584
收藏 0

运行环境:Redhat上搭建Vmare里运行Centos安装cacti(已经启动)

CentOS
Vmware
Redhat

已经正常运行一段时间,后来带宽升级了,需要修改/plugins/weathermap/editor.php参数。但是不知道虚拟机CentOS的密码,进入single模式重置了root密码。修改参数成功,突然发现topology里面流量都变为0。Graphs里面也是这样:Weathermaps发现一个错误:

加载中
0
jiangjinsai
jiangjinsai

开启Configuration-Settings-General-Poller Specific Logging-Poller Logging Level-DEBUG-Save

查看Utilities-System Utilities-View Cacti Log File

11:20:15 AM - SPINE: Poller[0] ERROR: SQL Failed! Error:'145', Message:'Table './cacti/poller_output' is marked as crashed and should be repaired', SQL Fragment:'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (2668,'cpu','2016-06-14 11:20:14','3 

修复数据库

0
jiangjinsai
jiangjinsai
>今日Cacti不显示流量,有如下 告警信息:

0/17/2012 10:26:38 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'145', SQL:"select poller_output.output, poller_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" 
10/17/2012 10:26:37 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'145', SQL:"select poller_output.output, poller_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" 
10/17/2012 10:26:36 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'145', SQL:"select poller_output.output, poller_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"  

Mysql中数据表修复:
#用REPAIR TABLE方式修复,语法:REPAIR TABLE 表名 [选项]
#进入Mysql数据库:
C:\AppServ\MySQL\bin>mysql -u root -p
Enter password: **************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 87
Server version: 5.0.45-community-nt-log MySQL Community Edition (GPL)
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
#显示所有数据库:
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| cacti              |
| mysql              |
| phpmyadmin         |
| test               |
+--------------------+
5 rows in set (0.00 sec)
 
mysql>
#连接损坏表所在的数据库:
mysql> use cacti;
Database changed
#查看当前连接的数据库:
mysql> select database();
+------------+
| database() |
+------------+
| cacti      |
+------------+
1 row in set (0.00 sec)
# REPAIR TABLE修复数据表
mysql> REPAIR TABLE poller_item;
+-------------------+--------+----------+----------+
| Table             | Op     | Msg_type | Msg_text |
+-------------------+--------+----------+----------+
| cacti.poller_item | repair | status   | OK       |
+-------------------+--------+----------+----------+
1 row in set (0.02 sec)
 
mysql>
修复成功。
如果修复失败,可以尝试用USE_FRM选项,例:
mysql> REPAIR TABLE poller_item USE_FRM;

返回顶部
顶部