Relatively new to Cacti and need some help.
Half of my graphs are not showing any new data (while the other half are) and I am getting the following errors inside cacti.log
Code: Select all
12/16/2014 10:04:59 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', 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"
12/16/2014 10:04:59 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
12/16/2014 10:04:59 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', 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"
12/16/2014 10:04:59 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
12/16/2014 10:04:59 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', 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"
12/16/2014 10:05:00 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT count(*) FROM poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'"
12/16/2014 10:05:00 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', 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"
12/16/2014 10:05:00 AM - POLLER: Poller[0] Maximum runtime of 298 seconds exceeded. Exiting.
12/16/2014 10:05:00 AM - SYSTEM STATS: Time:298.8408 Method:cmd.php Processes:1 Threads:N/A Hosts:19 HostsPerProcess:19 DataSources:481 RRDsProcessed:157
12/16/2014 10:05:00 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'2006', SQL:"REPLACE INTO settings (name,value) VALUES ('stats_poller','Time:298.8408 Method:cmd.php Processes:1 Threads:N/A Hosts:19 HostsPerProcess:19 DataSources:481 RRDsProcessed:157')'
12/16/2014 10:05:00 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'2006', SQL:"SELECT COUNT(*) FROM poller_command"
12/16/2014 10:05:00 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'2006', SQL:"REPLACE INTO settings (name,value) VALUES ('stats_recache','RecacheTime:0.0 HostsRecached:0')'
12/16/2014 10:05:00 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'2006', SQL:"SELECT 1 AS id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_bottom' AND ph.name IN ('settings', 'boost', 'dsstats') UNION SELECT pc.id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'poller_bottom' AND ph.name NOT IN ('settings', 'boost', 'dsstats') ORDER BY id ASC"
1.) MySQL database could be broken/corrupted.
- I have already analysed/optimised/repaired all the databases, no errors found.
Code: Select all
mysqlcheck -u cacti -p --auto-repair --optimize --all-databases
- I have already looked through all the crons I could find but only see the one job listed.
They don't show any jobs.crontab -l -u cacti
crontab -l -u root
crontab -l -u nagios
crontab -l -u nrpe
crontab -e -u cactiuser
crontab -l -u cactiuser
/etc/crontab - is empty
/etc/cron.d - shows cacti
/etc/cron.d/cacti - shows - */5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
Running (ten minutes after a reboot) ps aux | grep cacti shows:
Code: Select all
root 2484 0.0 0.0 100944 612 pts/0 S+ 11:57 0:00 tail -f cacti.log
cacti 3088 0.3 0.5 288248 21024 ? S 12:00 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 3117 0.6 0.4 284540 17300 ? S 12:00 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 4594 0.0 0.0 106096 1136 ? Ss 12:05 0:00 /bin/sh -c /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
cacti 4595 22.5 0.4 286496 18536 ? S 12:05 0:57 /usr/bin/php /usr/share/cacti/poller.php
cacti 4600 0.8 0.5 288248 21028 ? S 12:05 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 4603 0.0 0.0 158212 1496 ? S 12:05 0:00 /usr/bin/rrdtool -
cacti 4604 1.2 0.4 284540 17292 ? S 12:05 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
root 5046 0.0 0.0 103252 836 pts/1 S+ 12:09 0:00 grep cacti
Which looks like something is going out of control?cacti 2720 0.0 0.5 288248 21024 ? S 09:40 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 2737 0.0 0.4 284540 17296 ? S 09:40 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 4109 0.0 0.5 288248 21020 ? S 09:45 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 4124 0.0 0.4 284540 17292 ? S 09:45 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 4945 0.0 0.5 288248 21028 ? S 09:50 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 4976 0.0 0.4 284540 17292 ? S 09:50 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 6343 0.0 0.5 288248 21024 ? S 09:55 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 6347 0.0 0.4 284540 17492 ? S 09:55 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 7011 0.0 0.5 288248 21020 ? S 10:00 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 7015 0.0 0.4 284540 17296 ? S 10:00 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 8836 0.0 0.5 288248 21028 ? S 10:05 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 8855 0.0 0.4 284540 17532 ? S 10:05 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 9612 0.0 0.5 288248 21024 ? S 10:10 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 9616 0.0 0.4 284540 17296 ? S 10:10 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
root 10066 0.0 0.4 284544 17332 pts/2 S+ 10:11 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 10967 0.0 0.5 288248 21028 ? S 10:15 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 10971 0.0 0.4 284540 17296 ? S 10:15 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 11711 0.0 0.5 288248 21028 ? S 10:20 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 11732 0.0 0.4 284540 17384 ? S 10:20 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 13135 0.0 0.5 288248 21024 ? S 10:25 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 13139 0.0 0.4 284540 17292 ? S 10:25 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 13848 0.0 0.5 288248 21028 ? S 10:30 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 13880 0.0 0.4 284540 17296 ? S 10:30 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 15223 0.0 0.5 288248 21020 ? S 10:35 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 15227 0.0 0.4 284540 17460 ? S 10:35 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 15983 0.0 0.5 288248 21028 ? S 10:40 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 16015 0.0 0.4 284540 17292 ? S 10:40 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 17345 0.0 0.5 288248 21028 ? S 10:45 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 17349 0.0 0.4 284540 17292 ? S 10:45 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 18029 0.0 0.5 288248 21024 ? S 10:50 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 18038 0.0 0.4 284540 17296 ? S 10:50 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 19377 0.0 0.5 288248 21024 ? S 10:55 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 19381 0.1 0.4 284540 17384 ? S 10:55 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 20069 0.0 0.5 288248 21028 ? S 11:00 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 20073 0.1 0.4 284540 17500 ? S 11:00 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 21470 0.0 0.5 288248 21028 ? S 11:05 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 21474 0.1 0.4 284540 17292 ? S 11:05 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 22200 0.0 0.5 288248 21028 ? S 11:10 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 22204 0.1 0.4 284540 17328 ? S 11:10 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 23523 0.1 0.5 288248 21024 ? S 11:15 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 23527 0.1 0.4 284540 17296 ? S 11:15 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 24263 0.1 0.5 288248 21024 ? S 11:20 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 24267 0.2 0.4 284540 17296 ? S 11:20 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 25594 0.1 0.5 288248 21028 ? S 11:25 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 25598 0.2 0.4 284540 17292 ? S 11:25 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 26326 0.2 0.5 288248 21024 ? S 11:30 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 26330 0.3 0.4 284540 17404 ? S 11:30 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 27689 0.2 0.5 288248 21028 ? S 11:35 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 27693 0.4 0.4 284540 17292 ? S 11:35 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 28406 0.5 0.5 288248 21024 ? S 11:40 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 28438 0.7 0.4 284540 17596 ? S 11:40 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
cacti 29762 0.0 0.0 106096 1136 ? Ss 11:45 0:00 /bin/sh -c /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
cacti 29763 23.1 0.4 286496 18536 ? S 11:45 0:29 /usr/bin/php /usr/share/cacti/poller.php
cacti 29767 1.7 0.5 288248 21028 ? S 11:45 0:02 /usr/bin/php -q /usr/share/cacti/cmd.php 0 20
cacti 29770 0.0 0.0 158212 1496 ? S 11:45 0:00 /usr/bin/rrdtool -
cacti 29771 2.6 0.4 284540 17212 ? S 11:45 0:03 /usr/bin/php -q /usr/share/cacti/script_server.php cmd
root 30006 0.0 0.0 103256 848 pts/1 S+ 11:47 0:00 grep cacti
My MySQL conf file shows:
Code: Select all
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
max_connections = 1500
max_allowed_packet = 64
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
I am running CentOS 6.6, MySQL 5.1.73, Cacti 0.8.8b - All fresh install, no upgrading.
*Update*
I just ran the "repair_database.php " and the "rebuild_poller_cache.php" inside the cacti CLI folder then rebooted the machine.
But now Cacti is not polling any of the devices anymore.
I can confirm that the cron is running every 5 minutes.
Code: Select all
12/16/2014 01:35:02 PM - SYSTEM STATS: Time:0.1283 Method:cmd.php Processes:1 Threads:N/A Hosts:19 HostsPerProcess:19 DataSources:0 RRDsProcessed:0
12/16/2014 01:40:01 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
12/16/2014 01:40:01 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
12/16/2014 01:40:01 PM - SYSTEM STATS: Time:0.1070 Method:cmd.php Processes:1 Threads:N/A Hosts:19 HostsPerProcess:19 DataSources:0 RRDsProcessed:0
12/16/2014 01:45:01 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
12/16/2014 01:45:01 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q "/usr/share/cacti/cmd.php" 0 21]
12/16/2014 01:45:01 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
12/16/2014 01:45:01 PM - SYSTEM STATS: Time:0.1069 Method:cmd.php Processes:1 Threads:N/A Hosts:19 HostsPerProcess:19 DataSources:0 RRDsProcessed:0
12/16/2014 01:45:51 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
12/16/2014 01:45:57 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
12/16/2014 01:50:01 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
12/16/2014 01:50:01 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q "/usr/share/cacti/cmd.php" 0 21]
12/16/2014 01:50:01 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
12/16/2014 01:50:01 PM - SYSTEM STATS: Time:0.1069 Method:cmd.php Processes:1 Threads:N/A Hosts:19 HostsPerProcess:19 DataSources:0 RRDsProcessed:0