Cacti不繪制監控圖
剛上班,黃教主就叫:xxx,Cacti有問題啦!!!怎麼的啦?原來是Cacti不繪制監控圖了。
The steps for save issue:
1:出問題了,首先看相關服務日志:
#cd /var/www/html/cacti/log
#tail -fn100 cacti.log
09/18/2012 10:10:08 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1017', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_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"
發現有N行這樣的ERROR關于poller_output這張表的,後來查了一下,網上N多人說是此磁盤滿了(或其所在分區滿了),也沒心思查了,先看立刻解決問題的方法吧!!!
2:登入cacti所在的資料庫
#mysql -ucacti -pcacti cacti
mysql> select count(*) from poller_output;
ERROR 1017 (HY000): Can't find file: 'poller_output' (errno: 2)
出現大概如上的錯誤,查詢都沒法子,先把這張表的資料清空了。
mysql> truncate table poller_output;
Query OK, 0 rows affected (0.02 sec)
mysql> select count(*) from poller_output;
+----------+
| count(*) |
| 0 |
1 row in set (0.00 sec)
OK,一切恢複正常了,稍等監控圖也會出來啦!!!
看下cacti的日志:
09/18/2012 11:00:05 AM - PHPSVR: Poller[0] WARNING: Script Server terminated with signal 'SIGSEGV' in file:'ss_host_disk.php', function:'ss_host_disk', params:'172.31.10.11 23 2:161:500:1:10:51auto:::::: get total 38'
09/18/2012 11:00:09 AM - SYSTEM STATS: Time:7.3854 Method:spine Processes:10 Threads:10 Hosts:25 HostsPerProcess:3 DataSources:548 RRDsProcessed:455
09/18/2012 11:00:09 AM - SYSTEM THOLD STATS: Time:0.1994 Tholds:44 DownHosts:0
09/18/2012 11:05:10 AM - SYSTEM STATS: Time:8.1963 Method:spine Processes:10 Threads:10 Hosts:25 HostsPerProcess:3 DataSources:548 RRDsProcessed:455
一切正常了》
本文轉自 kuchuli 51CTO部落格,原文連結:http://blog.51cto.com/lgdvsehome/996902,如需轉載請自行聯系原作者