由于监控平台由于一位同事的异常操作,导致异常关机,所以当重启启动的时候,发现其他的一切正常,就是cacti监控没有出现图像,比较郁闷。
查看cacti日志发现有如下记录:
- 05/27/2011 06:36:57 PM - 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"
-
05/27/2011 06:36:56 PM - 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"
通过分析,可以知道是数据库出现异常导致的,其中有一个表损坏,进入数据库
查询该表出现如下错误:
- select * from poller_item;
-
ERROR 145 (HY000): Table './cacti/poller_item' is marked as crashed and should be repaired
这就可以找到问题了
于是进去该数据库目录:
执行如下数据库修复;
- myisamchk -r poller_item
-
- recovering (with sort) MyISAM-table 'poller_item'
-
Data records: 2417
-
- Fixing index 1
-
Wrong bytesec: 0- 0- 0 at 515400; Skipped
-
Wrong bytesec: 0- 0- 0 at 515400; Skipped
-
Wrong bytesec: 0- 0- 0 at 515400; Skipped
-
Wrong bytesec: 0- 0- 0 at 515400; Skipped
-
Wrong bytesec: 0- 0- 0 at 515400; Skipped
-
myisamchk: warning: Duplicate key for record at 484800 against record at 356364
-
- Fixing index 2
-
- Fixing index 3
-
- Fixing index 4
-
- Fixing index 5
-
Data records: 2404
-
myisamchk: warning: 1 records have been removed
稍等,从新打开cacti,出现图像。
异常解决。
阅读(3535) | 评论(2) | 转发(0) |