|
|
| Author |
Message |
mgb Cacti User
Joined: 21 Jun 2004 Posts: 102 Location: North of the Netherlands
|
Posted: Wed Jul 23, 2008 6:16 am Post subject: Link option: CACTI_GRAPH_ID |
|
|
Hello Howie,
Maybe a thought about the weathermap config.
Since I have a problem with my GD version I'm not able to use the editor and have to edit the config file by hand. Almost each link contains the following data:
| Code: | LINK fromAtoB
INFOURL /graph.php?rra_id=all&local_graph_id=1287
OVERLIBGRAPH /graph_image.php?local_graph_id=1287&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET /var/www/html/rra/SideA_traffic_in_1463.rrd
|
Therefore I can't use the Link Default and it takes some time to find the graph_id and the link rrd file. Would it be possible to have something like
| Code: | LINK fromAtoB
CACTIGRAPHID 1827
|
Instead of the previous three statements. It would make a much smaller en simpler to read config file.
Just a thought while handediting a large config file.
Michael  |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2135 Location: United Kingdom
|
Posted: Mon Jul 28, 2008 5:51 am Post subject: |
|
|
You can do it right now, apart from the target.
| Code: |
LINK DEFAULT
LINK fromAtoB
INFOURL /graph.php?rra_id=all&local_graph_id={link:this:graph_id}
OVERLIBGRAPH /graph_image.php?local_graph_id={link:this:graph_id}&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
LINK AtoB
NODES A B
SET graph_id 1287
TARGET /var/www/html/rra/SideA_traffic_in_1463.rrd
|
You might also look at this thread about automatically finding targets and graphs, for another possibility. |
|
| Back to top |
|
 |
mgb Cacti User
Joined: 21 Jun 2004 Posts: 102 Location: North of the Netherlands
|
Posted: Mon Jul 28, 2008 8:05 am Post subject: |
|
|
| Would it be easy to auto calculate the rrd filename from the graphid? |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2135 Location: United Kingdom
|
Posted: Mon Jul 28, 2008 8:25 am Post subject: |
|
|
| mgb wrote: | | Would it be easy to auto calculate the rrd filename from the graphid? |
Not reliably - a graph can refer to multiple rrds. The other way around (which is what that other thread is about) is possible - from a hostname and interface name/index to an rrd and a graph (of potentially many using the same .rrd).
If you can guarantee that there will never be more than one .rrd used in any graph, then it shouldn't be too hard to figure out a similar query. |
|
| Back to top |
|
 |
|