Moving Graphs To Other Graph Hierarchy Trees

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

Moderators: Developers, Moderators

Post Reply
jhay
Posts: 12
Joined: Tue Feb 25, 2003 2:51 pm

Moving Graphs To Other Graph Hierarchy Trees

Post by jhay »

How can I move graphs in one Hierarchy Tree to another? I accidently made all of my graphs in the default tree :oops:
Guest

Post by Guest »

One other thing, how can I change the defaults in the SNMP interfaces? I want it to change the defaults to where it will make the graphs into bits instead of bytes and change the Y axis
jhay
Posts: 12
Joined: Tue Feb 25, 2003 2:51 pm

Post by jhay »

Ah ha ! Found the script to change the bytes2bits but i cant find where they are talking about to canged the default value to 2 in the utility_functions.php file? :-?
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

In include/utility_functions.php change line 306 from:

Code: Select all

$graph_vertical_label = "Bytes Per Second";
to:

Code: Select all

$graph_vertical_label = "Bits Per Second";
In the same file change line 377 from:

Code: Select all

$sql_id = mysql_query("insert into rrd_graph_item (dsid,colorid,textformat,
	sequence,graphid,graphtypeid,consolidationfunction,hardreturn) values ($datasource_id[$o],
	$graph_color_array[$s],\"$graph_text_format_array[$s]\",((($o*4)+$s)+1),$graph_id,$graph_type,$graph_cf_function,
	\"$graph_hard_return_array[$s]\")",$cnn_id);
to:

Code: Select all

$sql_id = mysql_query("insert into rrd_graph_item (dsid,colorid,textformat,
	sequence,graphid,graphtypeid,consolidationfunction,hardreturn,cdefid) values ($datasource_id[$o],
	$graph_color_array[$s],\"$graph_text_format_array[$s]\",((($o*4)+$s)+1),$graph_id,$graph_type,$graph_cf_function,
	\"$graph_hard_return_array[$s]\",2)",$cnn_id);
- bulek
jhay
Posts: 12
Joined: Tue Feb 25, 2003 2:51 pm

Post by jhay »

You are the man, but you would be my hero if you can enlighten me on how to move graphs over to different trees.
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

It's not so strightforward so I will stay with non-hero status :) I am doing such operations directly on mysql table. The only one you have to change is called "graph_hierarchy_items". I'm not able to automate this because of time constraints but maybe someone else is willing to create such a very useful script?

- bulek
jhay
Posts: 12
Joined: Tue Feb 25, 2003 2:51 pm

Post by jhay »

I installed Webmin and see what you mean, I need to move the TreeID from 3 to "whatever". I can do this but then the web site doesnt have a link anymore to the database field :(
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests