BUG in Version 0.8.6h

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

Moderators: Developers, Moderators

Post Reply
Brandoo
Posts: 3
Joined: Thu Mar 16, 2006 9:47 pm

BUG in Version 0.8.6h

Post by Brandoo »

Hey all!

Have just found Cacti today, installed the debian woody package and everything ran fine.

Soon found out that this version was quite old (0.8.6c I believe) so installed from the .tar.gz from the main Cacti site.

Not much worked well, and through trial/ error/ troubleshooting all is now up and running.

While sorting out all my issues I have found a bug (I believe).

My cacti.log file displayed the following errors:
03/17/2006 03:12:51 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select data_template_data.rrd_step from (data_template_da
ta,data_template_rrd,graph_templates_item) where graph_templates_item.task_item_id=data_template_rrd.id and data_template_rr
d.local_data_id=data_template_data.local_data_id and graph_templates_item.local_graph_id=11limit 0,1"
I jumped in to mysql and ran the query - but it wouldn't run due to a syntax error:

Code: Select all

11limit 0,1
should read

Code: Select all

11 limit 0,1
Looking for references to data_template_data.rrd_step I find the following in graph.php (code pasted starting from line 132)

Code: Select all

        /* find the step and how often this graph is updated with new data */
        $ds_step = db_fetch_cell("select
                data_template_data.rrd_step
                from (data_template_data,data_template_rrd,graph_templates_item)
                where graph_templates_item.task_item_id=data_template_rrd.id
                and data_template_rrd.local_data_id=data_template_data.local_data_id
                and graph_templates_item.local_graph_id=" . $_GET["local_graph_id"] .
                "limit 0,1");
        $ds_step = empty($ds_step) ? 300 : $ds_step;
        $seconds_between_graph_updates = ($ds_step * $rra["steps"]);
Once I put in the space before limit, all errors disappeard. The altered code is now:

Code: Select all

        /* find the step and how often this graph is updated with new data */
        $ds_step = db_fetch_cell("select
                data_template_data.rrd_step
                from (data_template_data,data_template_rrd,graph_templates_item)
                where graph_templates_item.task_item_id=data_template_rrd.id
                and data_template_rrd.local_data_id=data_template_data.local_data_id
                and graph_templates_item.local_graph_id=" . $_GET["local_graph_id"] .
                " limit 0,1");
        $ds_step = empty($ds_step) ? 300 : $ds_step;
        $seconds_between_graph_updates = ($ds_step * $rra["steps"]);
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Have you applied all the patches from the offical site?
[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]
Brandoo
Posts: 3
Joined: Thu Mar 16, 2006 9:47 pm

Post by Brandoo »

Sorry - I feel like an idiot.

I did check all available patches, but the only one I saw was for MySQL Maximum Packet Size.

Have just checked again and found the patches under Cacti, and not cactid.

Sorry.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests