Multiple graphs from a single data source

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

Moderators: Developers, Moderators

Post Reply
ssozonoff
Posts: 12
Joined: Sat Jul 01, 2006 7:42 am

Multiple graphs from a single data source

Post by ssozonoff »

Hi all,

I have a question with regards to data sources, graphs and host templates.

Basically I have a single data source which gathers 8 parameters which I would like to plot on seperate graphs. First of all is this possible or is the relationship a 1 to 1?

I have setup a host template and when I apply it to a device and then "create graphs" using graph templates for that device, it systematically creates several of the same data sources for each graph even though one data source would suffice. What is the best way to approach this problem, maybe I am looking at it from the wrong angle?

Kind thanks,
Serge
ssozonoff
Posts: 12
Joined: Sat Jul 01, 2006 7:42 am

Post by ssozonoff »

Hmm..

Playing around some more I guess I can do this but I have to do it via "Graph Management" rather than "create graph" under the device?
danbeck
Posts: 30
Joined: Tue Jun 20, 2006 12:08 pm
Location: Huntsville, Alabama
Contact:

Post by danbeck »

If by "single datasource" you mean an RRD file, then yes, but only within a single device, obviously. If you have three graphs in a host template that all use the same datasource, only one RRD file is needed to collect the data.

If you are talking a datasource in the context of a Data Template, then Yes, this is entirely possible. Any graph can use any datasource as a graph item, multiple times and in multiple instances. You simply need to select the appropriate datasource when creating the graph items in a graph.
-Daniel

[url=http://dealnews.com/developers/cacti/memcached.html]memcached Template[/url] - Version 1.0

[url=http://dealnews.com/developers/]dealnews.com/developers[/url] - Useful scripts and Cacti templates.
[url=http://dealnews.com/]dealnews.com[/url] - How to go broke saving money.
ssozonoff
Posts: 12
Joined: Sat Jul 01, 2006 7:42 am

Post by ssozonoff »

Hi,
If you have three graphs in a host template that all use the same datasource, only one RRD file is needed to collect the data.
I would agree here and if I do things manually it does not seem to be an issue. The problem I have is when I apply a host template, which has 3 graph templates associated, to a device and then do "Create Graphs for this Host". It make a new Data Source for each graph even though they all use Graph Item Inputs from the same Data Source! Why does it insist on creating a new RRD file for each?

There is probably something I a, doing wrong or don't understand with regards to templates??

Thanks,
Serge
danbeck
Posts: 30
Joined: Tue Jun 20, 2006 12:08 pm
Location: Huntsville, Alabama
Contact:

Post by danbeck »

Well, either cacti has a good reason for creating multiple rrd files, or it's a deficiency in cacti concerning efficient use of datasources. You could submit this as a bug and see how it's handled.

Either way, what exactly is the problem for you, the user? RRD files, by definition, only use a finite and very small amount of storage space to store the accumulated data. If the point of cacti is to record and view statistical information about a nework device, does the relatively infinitesimal storage requirements really matter?
-Daniel

[url=http://dealnews.com/developers/cacti/memcached.html]memcached Template[/url] - Version 1.0

[url=http://dealnews.com/developers/]dealnews.com/developers[/url] - Useful scripts and Cacti templates.
[url=http://dealnews.com/]dealnews.com[/url] - How to go broke saving money.
ssozonoff
Posts: 12
Joined: Sat Jul 01, 2006 7:42 am

Post by ssozonoff »

Hi,
danbeck wrote: Either way, what exactly is the problem for you, the user? RRD files, by definition, only use a finite and very small amount of storage space to store the accumulated data.
No, but the overhead of additional polling for duplicate data does disturb me. With large amounts of devices, the less round trips I need to go to gather data the better, espcially if its all data I can get in 1 poll instead of 5 for example.

I do believe this to be an issue with Cacti and the way around it for me is to NOT use hots template. This is not ideal, but it works and is not to painful yet.

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

Post by gandalf »

First, I would state that your discussion goes absolutely in the right direction. This "feature" was often critizised. And the workaround was already found by yourselves.
While personally I find this really nasty, I do not agree with "not using Host Templates". Personally, I _strongly_ would suggest using them.
The workaround would be, to ctreate the first (set of) rrds as usual and create the later Graphs from Graph Management specifying Graph Template and Host. Then you may select from all available data sources. This would end in not havin duplicate rrd files.
IMHO, there is no real _reason_ for those duplicates. Personally, I suppose, that there is simply not yet any code to omit duplication.
Reinhard
ssozonoff
Posts: 12
Joined: Sat Jul 01, 2006 7:42 am

Post by ssozonoff »

Reinhard,

Thanks for this input and I would agree that the solution you presented as a workaround is a valid one which I later discovered.

Thanks,
Serge
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest