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!
Using RRD names as graph names - [possible?]
Moderators: Developers, Moderators
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
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
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.
This would be a nice one.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.
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.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.
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.
In the graph template --title is where we could use |rrd_filename| to create the diff names.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.
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.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
Who is online
Users browsing this forum: No registered users and 0 guests