GPRINT datasource problem in multi-DS graph template

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
dlc
Posts: 11
Joined: Thu Apr 14, 2005 12:14 pm

GPRINT datasource problem in multi-DS graph template

Post by dlc »

I'm trying to create a graph template to display several traces of the same kind of datasource. The problem is that (seemingly since I use the same Data Template for all of the graph items) all of the GPRINT statements are written out to use datasource (or DEF) 'a'. Is there a way to make the GPRINT statement use the most recent datasource item added? Or any way to manually specify the entire text of the graph item line? i.e. manually create my own GPRINT or other text, just like I would if I were using rrdtool directly.

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

Post by gandalf »

Not sure if I understood correctly:
When cacti uses a Graph Item, it is always correlated with a specific data source, NOT a specific rra of that data source. cacti uses rrdtools way to automatically use the "correct" rra depending on the timespan to be displayed.
What are you aiming at? Sth like the new SHIFT function to produce time offset? Can you please create a graph using "rrdtool" manually and post the Graph to get some insight?
Reinhard
dlc
Posts: 11
Joined: Thu Apr 14, 2005 12:14 pm

Post by dlc »

Concrete example: I'm monitoring the power demand on several transformers in each of our buildings. Each transformer has it's own RRD, with four DS in each (total power, and current for each of the three phases). I want use a graph template to show the data for all four transformers in each building on a combined graph--one graph per building, four traces.

I found the source of my problem: somehow when I added my second data source to the graph template, the "graph item input" for the first datasource became associated with all the new graph items as well. Once I unchecked the "wrong" boxes, my GPRINT is using the correct datasource.

(Damn, RRDTool and Cacti nomenclature is confusing. Data sources, data-source-sources, graph items, graph item inputs, etc. etc.) :)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

dlc wrote:I found the source of my problem: somehow when I added my second data source to the graph template, the "graph item input" for the first datasource became associated with all the new graph items as well. Once I unchecked the "wrong" boxes, my GPRINT is using the correct datasource.
So you don't need any more help on this, correct?
Reinhard
dlc
Posts: 11
Joined: Thu Apr 14, 2005 12:14 pm

Post by dlc »

lvm wrote:So you don't need any more help on this, correct?
Reinhard
That's correct; thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests