Graph Template Items are empty

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

Moderators: Developers, Moderators

Post Reply
self_sik
Posts: 2
Joined: Sat Jul 17, 2010 5:39 am

Graph Template Items are empty

Post by self_sik »

Hi,

I've noticed that in table graph_templates_item field local_graph_id has no 0 values, and cacti can't get the list of graph items, and shows empty list on graph template edit page. Anyway graphs are working fine, I just can't edit my templates no more.

Can you suggest how I can restore these values? I think the main problem is task_item_id field, I don't know what value should be in this field.

Thank you.
Attachments
Screen shot 2010-07-17 at 2.34.51 PM.png
Screen shot 2010-07-17 at 2.34.51 PM.png (32.75 KiB) Viewed 742 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is which version of Cacti, please?
You should find an SQL error in cacti.log, then. Please post that
R.
self_sik
Posts: 2
Joined: Sat Jul 17, 2010 5:39 am

Post by self_sik »

Version - 0.8.7f (CentOS 5.5)

There is no SQL error in log file, simple DB has no entries which cacti is looking for:

Code: Select all

 $template_item_list = db_fetch_assoc("select
                        graph_templates_item.id,
                        graph_templates_item.text_format,
                        graph_templates_item.value,
                        graph_templates_item.hard_return,
                        graph_templates_item.graph_type_id,
                        graph_templates_item.consolidation_function_id,
                        CONCAT_WS(' - ',data_template_data.name,data_template_rrd.data_source_name) as data_source_name,
                        cdef.name as cdef_name,
                        colors.hex
                        from graph_templates_item
                        left join data_template_rrd on (graph_templates_item.task_item_id=data_template_rrd.id)
                        left join data_local on (data_template_rrd.local_data_id=data_local.id)
                        left join data_template_data on (data_local.id=data_template_data.local_data_id)
                        left join cdef on (cdef_id=cdef.id)
                        left join colors on (color_id=colors.id)
                        where graph_templates_item.graph_template_id=" . $_GET["id"] . "
                        and graph_templates_item.local_graph_id=0
                        order by graph_templates_item.sequence");


I guess this query from function item() (graph_templates.php) returns empty list because there are no entries with local_graph_id=0.

I wrote small script which simply adds such entries, but it does not really help.

Thank you.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please either upgrade to 087g or downgrade to 087e. 087f is buggy. I will review the SQL nevertheless
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests