cacti日志报错:
05/25/2011 11:40:01 AM – SPINE: Poller[0] ERROR: SQL Failed! Error:’1062′, Message:’Duplicate entry ‘3-mem_buffers-2011-05-25 11:40:01’ for key ‘PRIMARY”, SQL Fragment:’INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (3,’mem_buffers’,’2011-05-25 11:40:01′,’927912′),(4,’mem_swap’,’2011-05-25 11:40:01′,’4192956′),(5,”,’2011-05-25 11:40:01′,’1min:0.10 5min:0.16 10min:0.23′),(6,’users’,’2011-05-25 11:40:01′,’4′),(7,’proc’,’2011-05-25 11:40:01′,’169′),(8,’hdd_free’,’2011-05-25 11:40:01′,’47949780′),(8,’hdd_used’,’2011-05-25 11:40:01′,’44424292′)’
Check
– /etc/crontab
– /etc/cron.d/cacti
– crontab of root and cactiuser
cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
crontab -l -u cactiuser
*/5 * * * * /usr/local/php/bin/php /opt/local/www/html/cacti/poller.php > /dev/null 2>&1
cat /etc/cron.d/cacti
*/5 * * * * cacti php /var/www/cacti/poller.php &>/dev/null
注释以上语句故障排除。