Using RRD names as graph names - [possible?]

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

Moderators: Developers, Moderators

Post Reply
sluke
Posts: 22
Joined: Mon Apr 21, 2008 2:49 pm

Using RRD names as graph names - [possible?]

Post by sluke »

I have ~150 externaly updated RRD files. I've gone through the lovely walkthrough on graphing (ONE) of these...works great.

Is there a way to get my graphs to include the name of the RRD filename within the graph/template/etc using a $VAR of some kind?

I'm worried that I'm going to have to not only setup 150 external data templates but also 150 graphs as well (to input the names).

What I would love is the ability to specify ALL (*) RRDs in a dir and then graph all hosts with host_desc | rrd_filename

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

Post by gandalf »

I do not agree with the approach of adding the rrd file name. There are other options to manage graphs and stuff. As a basic intro, please read 1st link of my sig
Reinhard
sluke
Posts: 22
Joined: Mon Apr 21, 2008 2:49 pm

Post by sluke »

Can you suggest a better way?

The url/doc you referenced is the exact doc that I read/used (very good). But I don't want to have to do ALL those steps for each rrd file.

(Howto use externally updated rrd files + BONUS TRACK)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Well, is sounds to me that you're requesting several different things to accomplish your task.
The story about allowing for a specific cacti-internal variable, let's call it |rrd_filename| is the first request. Was never asked for before, but sounds not very difficult.
The next issue is kind of a "mass import" of existing rrd files. That's quite inetersting and does match an often asked feature for MRTG import. If you are able to create a most generic approach, I'd like to consider it.
Let's devide this second task into several steps.

Locate the files: E.g. give a path along with a file mask to get the list of rrd files to work on

Define a Data Template: Cacti requires Data Sources. If rrd files are of similar structure, e.g. lot's of "Interface Traffic" stuff, it would be possible to match an existing data template to those rrd files. From here, it should be possible to generate the missing data sources by mapping a Data Template with each rrd file in turn. The matching to the rra list is an additional task.

Define a Graph Template: Last step would be to define the Graph itself. As with the data source, it would be best to match a list of objects to one and the same Graph Template.

So the whole story relies on several assumptions:
- Is it possible to group all rrd files into some few lists of similar objects using the same Data Template and Graph Template each?
- Would it be ok to implement this as a script only? A GUI might be a next step, but as this task should be executed only very rarely, I see no need for a GUI

Please comment
Reinhard
Last edited by gandalf on Sat Apr 26, 2008 12:21 pm, edited 1 time in total.
sluke
Posts: 22
Joined: Mon Apr 21, 2008 2:49 pm

Post by sluke »

gandalf wrote:The story about allowing for a specific cacti-internal variable, let's call it |rrd_filename| is the first request. Was never asked for before, but sounds not very difficult.
This would be a nice one.
gandalf wrote:The next issue is kind of a "mass import" of existing rrd files. That's quite inetersting and does match an often asked feature for MRTG import.
drraw has this function with a template that you simply specify the location and regex/() to get/use the name. Once the template is created it finds all the names within the regex that matches and then can quickly be selected and used to generate graphs.

With cacti maybe during the create 'External Data Template' you could specify a wildcard for the RRD location /var/tmp/rrd/(.*).rrd

On submit it would simply create X number of external data templates for each rrd named $1 from the () above.
gandalf wrote:Define a Graph Template: Last step would be to define the Graph itself. As with the data source, it would be best to match a list of objects to one and the same Graph Template.
In the graph template --title is where we could use |rrd_filename| to create the diff names.
gandalf wrote:Would it be ok to implement this as a script only? A GUI might be a next step, but as this task should be executed only very rarely, I see no need for a GUI
A script would be a nice start but I wonder if it might be something that could be 'worked-around' within the existing gui with a few changes.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

For a general purpose feature, this requires discussion with all devs.
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests