SQL Insert ERROR and randon graphs missing

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
ghorne
Posts: 1
Joined: Tue Jul 24, 2007 7:54 am

SQL Insert ERROR and randon graphs missing

Post by ghorne »

I have seached the forum and googled but not found any relevent fixes to my current problem.

I am using cacti version 0.8.6j with the official download patches for 0.8.6j applied. I also followed all the steps from the document "Debug NaN's in your graphs" on the docs.cacti.net site.

The problem is random device data and graphs are missing form all servers. snmpwalk is returing all the relevent data when used manually. There are continual database insert errors in the cacti.log.

DETAILS
======
The /etc/crontab file has only this entry in the last line - */5 * * * * cactiuser /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1

If I run the poller manually I get the following message: 07/24/2007 03:28:28 PM - SYSTEM STATS: Time:16.1751 Method:cmd.php Processes:1 Threads:N/A Hosts:5 HostsPerProcess:5 DataSources:91 RRDsProcessed:24

If I use /usr/bin/snmpwalk -Os -c private -v 2c <SERVER-FQDN> interface I get all the correct and relevent data back from the remote server.

If I take the errors reported in the log/cacti.log file "<TIMESTAMP> PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed" I can then cut and paste the failed table insert manually into the cacti database using CLI using the same username and pasword of the cactiuser with no errors. An example would be "insert into poller_output (local_data_id, rrd_name, time, output) values (72, 'hdd_used', '2007-07-24 15:30:14', '2032283648')". This insert failed but can be manually inserted into the mysql database.

There just seems to be random chunks of data missing from most of the graphs.

Initially I thought the database had become screwed so I droped and recreated all the tables again. Then reconfigured all devices and graphs from scratch.

Any ideas?

I have attached the debug file if that would help anyone.

Thanks
Graham
Attachments
cacti.txt
Cacti Log in debug
(484.67 KiB) Downloaded 193 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I'm quite sure you're hitting th edouble poller issue
Host[2] DS[8] SNMP: v2: mansrv01.edentitylabs.net, dsname: cpu_nice, oid: .1.3.6.1.4.1.2021.11.51.0, output: 3
07/24/2007 03:50:03 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (8, 'cpu_nice', '2007-07-24 15:50:03', '3')"
07/24/2007 03:50:03 PM - CMDPHP: Poller[0] Host[2] DS[8] SNMP: v2: mansrv01.edentitylabs.net, dsname: cpu_nice, oid: .1.3.6.1.4.1.2021.11.51.0, output: 3
07/24/2007 03:50:03 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (8, 'cpu_nice', '2007-07-24 15:50:03', '3')"
07/24/2007 03:50:03 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (8, 'cpu_nice', '2007-07-24 15:50:03', '3')"
See two times the same insert, the second one returning an ERROR (would be sth like duplicate index with mysql). I'm quite sure that a second crontab (I would bet /etc/cron.d/cacti) is running in parallel
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest