Bug? : No graphs on graph tree

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

Moderators: Developers, Moderators

User avatar
nahun
Cacti User
Posts: 92
Joined: Wed Feb 15, 2006 11:27 pm
Location: Idaho
Contact:

Post by nahun »

I have the same issue too, I haven't tried to fix it though because its so minor. Looks like it might be a bug?
[size=75]Solaris 10 x86 [color=red][b]||[/b][/color] Cacti - 0.8.7 [color=red][b]||[/b][/color] MySQL - 5.0.45 [color=red][b]||[/b][/color] PHP - 5.2.6 [color=red][b]||[/b][/color] RRDTool - 1.2.23 [color=red][b]||[/b][/color] NET-SNMP - 5.4.1 [color=red][b]||[/b][/color] Syslog-ng 2.0.5
[url=http://www.indigo-networks.com]indigo-networks.com[/url][/size]
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Before I would consider it to be a bug, I would like either of you that are still having the issue to email me a dump of you database.
[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]
poiser
Posts: 1
Joined: Mon Mar 06, 2006 6:03 pm

Post by poiser »

I had the same problem, too.

But I think I fixed it by going in "Graph Trees", select your tree, select the host you want, once you are in "Tree items", click save even though you have the same exact config, and once you are back, click save again. You should be able to see the entry in the graphs now.

I got the idea from the previous solution before, it seems like when you first "move" the object into the graphs, not all the information were committed so you have to manually recommit the reference of the host in the graphs again by going into individual host and manually save them.

I hope this helps.
thosil
Posts: 1
Joined: Tue Mar 07, 2006 7:16 am

Post by thosil »

Hi all,
I've got the same problem with cacti 0.8.6h + all patches.

I've looked in the code of "host.php".
At line 281 I''ve fonded this:

Code: Select all

api_tree_item_save(0, $_POST["tree_id"], TREE_ITEM_TYPE_HOST, $_POST["tree_item_id"], "", 0, read_graph_config_option("default_rra_id"), $selected_items[$i], 0, 0, false);
In facts the two "0" after $selected_items[$i] are respectively for:
$host_grouping_type and $sort_children_type.
As poiser suggested, I have also "resaved" some already placed host and it set the fields host_grouping_type and sort_children_type in the db to value "1".

So on my system the line 281 of the file host.php is like this:

Code: Select all

api_tree_item_save(0, $_POST["tree_id"], TREE_ITEM_TYPE_HOST, $_POST["tree_item_id"], "", 0, read_graph_config_option("default_rra_id"), $selected_items[$i], 1, 1, false);
And now it's working as expected.
As attachment, my custom host.php (note that I'm not responsible of any problems caused on your system if you used this file)
Attachments
host.php.txt
Customized host.php
(32.67 KiB) Downloaded 342 times
--
Thomas Silvestre
chalieroot
Posts: 2
Joined: Fri Mar 03, 2006 7:35 pm

Post by chalieroot »

Thanks to poiser, I tried that and it fixed my graphs in tree view.
egironda
Posts: 45
Joined: Mon Dec 19, 2005 6:44 pm

Post by egironda »

I had this same issue with hosts added to trees after 0.8.6h...

Code: Select all

update graph_tree_items set host_grouping_type = 1, sort_children_type = 1;
worked like a charm.
Matt`G
Posts: 11
Joined: Wed May 17, 2006 10:26 am
Location: Michigan, USA

Post by Matt`G »

thosil wrote:Hi all,
I've got the same problem with cacti 0.8.6h + all patches.

I've looked in the code of "host.php".
At line 281 I''ve fonded this:

Code: Select all

api_tree_item_save(0, $_POST["tree_id"], TREE_ITEM_TYPE_HOST, $_POST["tree_item_id"], "", 0, read_graph_config_option("default_rra_id"), $selected_items[$i], 0, 0, false);
In facts the two "0" after $selected_items[$i] are respectively for:
$host_grouping_type and $sort_children_type.
As poiser suggested, I have also "resaved" some already placed host and it set the fields host_grouping_type and sort_children_type in the db to value "1".

So on my system the line 281 of the file host.php is like this:

Code: Select all

api_tree_item_save(0, $_POST["tree_id"], TREE_ITEM_TYPE_HOST, $_POST["tree_item_id"], "", 0, read_graph_config_option("default_rra_id"), $selected_items[$i], 1, 1, false);
And now it's working as expected.
As attachment, my custom host.php (note that I'm not responsible of any problems caused on your system if you used this file)
This fix worked great for me, thanks for posting!
razvanu
Posts: 7
Joined: Thu Jan 08, 2009 4:38 am
Location: Ro
Contact:

Post by razvanu »

i have same problem, name in graph trees from console not appear in graph

Code: Select all

mysql>
mysql> use cacti;
Database changed
mysql> update graph_tree_items set host_grouping_type = 1, sort_children_type = 1;
Query OK, 0 rows affected (0.01 sec)
Rows matched: 1754  Changed: 0  Warnings: 0
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests