Import of existing rrd's

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

Moderators: Developers, Moderators

Post Reply
abush
Posts: 7
Joined: Sun Jan 27, 2002 7:00 pm
Location: Columbus, OH

Post by abush »

I am currently working on a page that will import an existing rrd into the cacti db structure. Before i get too far has anyone already done this?

Here is what i hope it will do:
1) user can upload rrd's to the rra directory and then import them OR
2) users can post the rrd to the web server from their local machine.
3) the page will add the data source to the db and give the option to also setup a graph and graph items for you automatically.
4) and possibly have a preview to show what would be done w/o actually doing it.

Thanks,
-ab
Guest

Post by Guest »

The trick here is to find the datasource name(s) in the .RRD that you'll want to graph.
Run "RRDTOOL Dump Myfile.rrd >>Myfile.xml" to get the info. If you're using MRTG with the "use RRDTOOL" option, then the datasources are either ds0 or ds1. Look at the previous post entitled "Question about RRDTOOL Functions" posted on Jan 17th for steps to integrate with Cacti.

Nic
abush
Posts: 7
Joined: Sun Jan 27, 2002 7:00 pm
Location: Columbus, OH

Post by abush »

Yes i have already created a program that will use the rrdtool dump and parse the XML.

I was just wondering if this would be useful to others or if anyoone else had already started a similar project.

I'm about 3/4 of the way done with the program. If anyone wants to try it let me know.

Thanks,
-ab
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

This is functionality that I have been planning for a while, but I'm not sure to what extent yet. Some have suggested that I create a feature to automatically import existing mrtg.cfg files. While this is an excellent idea; it would no doubt be very time consuming to do it right. It would have to include support for data sources, data input sources, and graphs within cacti.

About the .rrd file importing. I am interested in doing this also. The thing to keep in mind is that not only the 'data source name' would need to be gathered from the data source, but a heartbeat, min/max values, etc.

I think that the rrdtool DUMP function dumps all of this data to an XML file and would probably work. If I were to implement it, I would probably use the rrdtool INFO function since it dumps this data in a much cleaner manner as it seems.

Here is what I had in mind for such a feature. See how it differs from your ideas.

- The user will be able to select and number of .rrd files by giving cacti local path. You will also be able to upload the .rrd files.
- Cacti will parse the .rrd file structure using the INFO/DUMP functions and make the appropriate data source entries.
- Cacti would optionally make graphs for these data sources using some common structure or maybe even using a templating system in the future.

Who knows where this can go, there is many possibilities here. Feel free to submit any patches you have though and we can see what can be worked out.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests