Hi,
I have just installed cacti and would like to import all my MRTG data over. is this possible??
Thanks
MRTG to Cacti
Moderators: Developers, Moderators
-
- Posts: 11
- Joined: Fri Jul 11, 2003 1:58 pm
I don't know of a easy way. But here is something that you can try.
1) Create all the required graphs in Cacti using the web interface.
2) Get the names of the rrd' created by Cacti
3) Export data from your MRTG rrd' by using "rrdtool dump RRD_FILENAME > XMLFILENAME.XML"
4) Import data from the XML file to the rrd that Cacti created "rrdtool restore XMLFILENAME.XML CACTI_RRD_FILENAME.RRD"
If you have all your MRTG rrds and Cacti rrds ready, maybe you can just script the above steps and do it in an automated way.
Also please make sure that you are exporting and importing as the user that runs cacti (usually cactiuser)
Hope this helps.
- V.
1) Create all the required graphs in Cacti using the web interface.
2) Get the names of the rrd' created by Cacti
3) Export data from your MRTG rrd' by using "rrdtool dump RRD_FILENAME > XMLFILENAME.XML"
4) Import data from the XML file to the rrd that Cacti created "rrdtool restore XMLFILENAME.XML CACTI_RRD_FILENAME.RRD"
If you have all your MRTG rrds and Cacti rrds ready, maybe you can just script the above steps and do it in an automated way.
Also please make sure that you are exporting and importing as the user that runs cacti (usually cactiuser)
Hope this helps.
- V.
-
- Posts: 2
- Joined: Wed Mar 03, 2004 3:29 pm
- Location: WI
- Contact:
Hi there,
I was hoping there was a way to use existing rrds in Cacti. I have MRTG running that creates (and will update) my rrds. I can get cacti to create a graph from one of them by creating an inactive Data source and provide the path to the rrd.
But how would I do that for ~50 hosts? How can I create a template that will read the rrd and then just use the template?
Any ideas?
Thanks,
Sven
I was hoping there was a way to use existing rrds in Cacti. I have MRTG running that creates (and will update) my rrds. I can get cacti to create a graph from one of them by creating an inactive Data source and provide the path to the rrd.
But how would I do that for ~50 hosts? How can I create a template that will read the rrd and then just use the template?
Any ideas?
Thanks,
Sven
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I suggest migrating to Cacti. However, to get your RRD's into Cacti and to make graphs, it is best to start with Hammer, Nails, Brick, and Mortar.
In other words, if you can code, best start now and contribute to the overall community what you create. If it's good, it may even make it into the mainline project.
TheWitness
In other words, if you can code, best start now and contribute to the overall community what you create. If it's good, it may even make it into the mainline project.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Importing MRTG data (script)
This isn't perfect, but it works. I just spent the weekend snarfing all our old MRTG/RRD data and loading it into Cacti.
What I did was create the devices and graphs and stuff as if they were new data. I then exported the MRTG data and imported it into Cacti. I like Cacti's intelligent handling of datasource names, so I had to write something that would change ds0 and ds1 into something that cacti was expecting. You'll have to change cactiuser inside the script (it chowns after import), but everything else is a flag.
It would also work if you change a datasource name within a Cacti rrd and don't want to manually export, hack, and import.
Enjoy!
What I did was create the devices and graphs and stuff as if they were new data. I then exported the MRTG data and imported it into Cacti. I like Cacti's intelligent handling of datasource names, so I had to write something that would change ds0 and ds1 into something that cacti was expecting. You'll have to change cactiuser inside the script (it chowns after import), but everything else is a flag.
It would also work if you change a datasource name within a Cacti rrd and don't want to manually export, hack, and import.
Enjoy!
- Attachments
-
- convert.pl.txt
- Quickly convert DS names inside of RRDs
- (2.47 KiB) Downloaded 1244 times
Adrian Goins - President / CEO
Arces Network, LLC
http://www.arces.net
Arces Network, LLC
http://www.arces.net
Who is online
Users browsing this forum: No registered users and 5 guests