[SOLVED] - Gaps in my graphs/ SQL exec problem

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
onahp
Posts: 6
Joined: Wed Feb 28, 2007 5:59 am

[SOLVED] - Gaps in my graphs/ SQL exec problem

Post by onahp »

Hi !

I'm a french student and i've just installed Cacti.

Here is my configuration:

CentOS 4.4 (Virtuozzo 3.0.0)
Apache 2.0.52
PHP 5.0.4
MySQL 4.1.20
Net-Snmp 5.1.2
RRDtool 1.2.18
Cacti 0.8.6j

I installed Cacti from RPM.

I've got some gaps in my graphs and when i read the logs, there are some errors:

Code: Select all

02/28/2007 12:15:03 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (107, 'traffic_in', '2007-02-28 12:15:02', '2787449268')"
...
Has anybody already met this kind of errors ?
Sometimes, there are no gaps and sometimes they come back. I don't know why :(
Is there a relationship between MySQL and gaps in my graphs ?

Could someone help me to fix this error ?

Thanks for your help.
Attachments
Gaps
Gaps
graph_image.jpg (26.59 KiB) Viewed 2778 times
Last edited by onahp on Mon Mar 05, 2007 3:38 am, edited 1 time in total.
zeki
Cacti User
Posts: 92
Joined: Fri Feb 09, 2007 10:55 pm
Location: So. Cal
Contact:

Post by zeki »

i have the same problem just happened this morning.
CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (460, 'traffic_out', '2007-02-28 13:30:56', '300583301286')"

any help?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Run the following query on your Cacti database while the poller is not running:

Code: Select all

select count(*) from poller_output;
If the count is greater than 0, you need to run the following query:

Code: Select all

truncate table poller_output;
Do these actions when the poller is not running.

Also, check that your cacti.log in the log directory hasn't gotten to large.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
zeki
Cacti User
Posts: 92
Joined: Fri Feb 09, 2007 10:55 pm
Location: So. Cal
Contact:

Post by zeki »

thanks for the quick response. i reinstalled cacti and my graphs are back up again, but after i tried those 2 commands, i keep getting the errors .

02/28/2007 02:45:51 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (461, 'traffic_in', '2007-02-28 14:45:50', '33568869789240')"
02/28/2007 02:45:51 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (461, 'traffic_out', '2007-02-28 14:45:50', '11591424929422')"

i moved the cacti.log since it was about 400mb
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Um...

Well, something is up with the data source that has the ID 461.

If you try to execute the query that is getting an error in your mysql client, what does it say?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
zeki
Cacti User
Posts: 92
Joined: Fri Feb 09, 2007 10:55 pm
Location: So. Cal
Contact:

Post by zeki »

its not just for id 461. they are from id 8-461

mysql> insert into poller_output (local_data_id, rrd_name, time, output) values (461, 'traffic_in', '2007-02-28 14:55:48', '33582171725729')
-> ;
ERROR 1062 (23000): Duplicate entry '461-traffic_in-2007-02-28 14:55:48' for key 1
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Make sure the poller is not running.... and execute the following query...

Code: Select all

truncate table poller_output;
Also, increase the max_execution_time to 300 and the memory_limit to 64M or 128M in your php.ini file.

I suspect you are running out of memory to process the poller_output table when the poller is running and entries are getting left behind, when the poller terminates before it's done.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
zeki
Cacti User
Posts: 92
Joined: Fri Feb 09, 2007 10:55 pm
Location: So. Cal
Contact:

Post by zeki »

is it possible its trying to enter the data into mysql twice?

02/28/2007 03:55:53 PM - SYSTEM STATS: Time:51.3869 Method:cmd.php Processes:1 Threads:N/A Hosts:11 HostsPerProcess:11 DataSources:790 RRDsProcessed:656
02/28/2007 03:55:53 PM - SYSTEM STATS: Time:51.4205 Method:cmd.php Processes:1 Threads:N/A Hosts:11 HostsPerProcess:11 DataSources:790 RRDsProcessed:626

both of these processes occur at the same time
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Yes, check all your crontabs, you might have 2 pollers running.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
zeki
Cacti User
Posts: 92
Joined: Fri Feb 09, 2007 10:55 pm
Location: So. Cal
Contact:

Post by zeki »

no more errors =)
thanx for the help
onahp
Posts: 6
Joined: Wed Feb 28, 2007 5:59 am

Post by onahp »

Hi !

The count was equal to 0.
However, I tried the command: truncate table poller_output;
I'll see if it is fixed :)

Thanks for answering so quickly ! :)
onahp
Posts: 6
Joined: Wed Feb 28, 2007 5:59 am

Post by onahp »

I've installed Cacti again, but there is still a problem.
When I enter this command:
mysql> insert into poller_output (local_data_id, rrd_name, time, output) values (54, 'traffic_out', '2007-03-01 11:40:05', '432494450');
Query OK, 1 row affected (0.00 sec)
It's ok, but my original problem still remain.

Code: Select all

 03/01/2007 11:40:06 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (54, 'traffic_out', '2007-03-01 11:40:05', '432494450')"
03/01/2007 11:40:06 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (54, 'traffic_in', '2007-03-01 11:40:05', '980320436')"
03/01/2007 11:40:06 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (53, 'traffic_out', '2007-03-01 11:40:05', '4109991974')"
03/01/2007 11:40:06 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "insert into poller_output (local_data_id, rrd_name, time, output) values (53, 'traffic_in', '2007-03-01 11:40:05', '4121032109')"
Sometimes, I've this:

Code: Select all

 03/01/2007 11:44:55 AM - SYSTEM STATS: Time:292.7468 Method:cmd.php Processes:1 Threads:N/A Hosts:7 HostsPerProcess:7 DataSources:73 RRDsProcessed:93
03/01/2007 11:44:55 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
I tried the 2 commands and edited my php.ini as said rony.

Do you think, it's a problem of memory ?
I don't know if my problem is due to Virtuozzo.
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

SIMPLE ANSWER "2 pollers running". If you installed from a package, you don't have to add the crontab entry. Seek them out.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
onahp
Posts: 6
Joined: Wed Feb 28, 2007 5:59 am

Post by onahp »

Hi !

I reinstalled Cacti from sources, it seems to work now :)

Thanks a lot for your help !
onahp
Posts: 6
Joined: Wed Feb 28, 2007 5:59 am

Post by onahp »

Hi !

I let Cacti run during this week-end and no more problem occured.

Effectively, when I installed Cacti from RPM, I had a cronjob created in my cron.d directory. I didn't pay attention to this, that's why I had my problem. I used to install Cacti from sources, and this time i tried by RPM and I add an entry in my crontab. I didn't know that it will be included in this package.

So, if anyone install Cacti from RPM on a CentOS 4.4, check your crontab.

I think my problem is fixed now, I hope ... lol :)

Thank you all for your help !!!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests