Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Link option: CACTI_GRAPH_ID

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map)
Author Message
mgb
Cacti User


Joined: 21 Jun 2004
Posts: 102
Location: North of the Netherlands

PostPosted: Wed Jul 23, 2008 6:16 am    Post subject: Link option: CACTI_GRAPH_ID Reply with quote

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

PostPosted: Mon Jul 28, 2008 5:51 am    Post subject: Reply with quote

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

PostPosted: Mon Jul 28, 2008 8:05 am    Post subject: Reply with quote

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

PostPosted: Mon Jul 28, 2008 8:25 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group