Anyone moved from MRTG to Cacti

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

Moderators: Developers, Moderators

Post Reply
shadow1975
Posts: 32
Joined: Wed Mar 02, 2005 11:58 am

Anyone moved from MRTG to Cacti

Post by shadow1975 »

I am looking for anyone who has moved from the MRTG monitoring system over to Cacit and was wondering if they have been able to import the settings they had in MRTG into Cacti with out having to rebuild the monitoring setup with in Cacti?


:D :D :D
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

On the todo list of Cacti Development Team, is a MRTG Importer.......

I don't know of anyone that has "imported" a MRTG configuration, I do know of people resetting them up and importing existing data into the rrd's, so that historical data is not lost.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
omen1000
Posts: 7
Joined: Wed Mar 02, 2005 8:58 pm

Converting MRTG to Cacti

Post by omen1000 »

There are some scripts around that will help you... basically you will need to do an rrdtool dump nameofmrtgrrd.rrd > nameoftemp.xml, then change 'ds0' to 'traffic_in' and change 'ds1' to 'traffic_out', then do rrdtool restore nameoftemp.xml > nameofcactirrd.rrd.

move the new file into cacti's rra folder, overriting the other one that cacti created... set perm's and your all set.
shadow1975
Posts: 32
Joined: Wed Mar 02, 2005 11:58 am

Post by shadow1975 »

Thanks very much for the help friend.
havok1977
Posts: 49
Joined: Fri Apr 08, 2005 1:41 pm

Post by havok1977 »

Does anyone know of a way to convert native .log MRTG files to a rrd database?

I thought of using the mrtg-rrd addon, but it doesnt work for our setup, since we backup a .log file daily for each monitored interface traffic, so if we were to use mrtg-rrd; it would only convert the .log corresponding to the day it is implemented.

What i need is a script of some sort thar wll convert all of the .log files for a certain interface to a rrd file, has anyone tried this?
havok1977
Posts: 49
Joined: Fri Apr 08, 2005 1:41 pm

Post by havok1977 »

Searching a little a found a perl script that is included with rrdtool called log2rrd.pl, in my Debian server it is located under /usr/share/doc/rrdtool/examples/log2rrd.

Sadly it only supports convertion of a single .log file to rrd, so i guess ill have to write a script that will sweep the contents of a directory and use every single .log to populate a .rrd, ill begin and let everyone know about the results.
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

havok1977 wrote:Does anyone know of a way to convert native .log MRTG files to a rrd database?

I thought of using the mrtg-rrd addon, but it doesnt work for our setup, since we backup a .log file daily for each monitored interface traffic, so if we were to use mrtg-rrd; it would only convert the .log corresponding to the day it is implemented.

What i need is a script of some sort thar wll convert all of the .log files for a certain interface to a rrd file, has anyone tried this?

It has been a while since I used MRTG - thanks to Cacti, but doesn't MRTG do this natively when you change the backend to rrd in the config files?
from http://people.ee.ethz.ch/~oetiker/webto ... g-rrd.html
When you have made this modification to the configuration file, several things will happen when you run mrtg again with the new config file:

1.
mrtg will take all your old .log files and convert them to .rrd format. (The .log files don't get touched in the process, so if things don't work out they are still there.)

2.
mrtg will use rrdtool to update its databases. These will have a new format called rrd which is totally different than the native log format of the classic mrtg.

3.
mrtg will not create any webpages of graphs anymore. It will only query the routers for traffic information and update its rrd databases.

The advantage of whole thing is that the mrtg will become much faster. Expect the runtime to drop to 20% of the previous value. (I would like to get some feedback on this from folks with large installations.)

Mind you, though, while the logging process of RRDtool is very fast, you are also gaining some time by neither creating graphs nor updating webpages. The idea behind this is that it is more efficient to create graphs and webpages on demand by using a cgi script.

At the moment there is no official script to do this, but two contributers have created such scripts:
anderiv
Posts: 11
Joined: Wed Sep 08, 2004 3:11 pm
Location: Blaine, MN
Contact:

Post by anderiv »

havok1977 wrote:Sadly it only supports convertion of a single .log file to rrd, so i guess ill have to write a script that will sweep the contents of a directory and use every single .log to populate a .rrd, ill begin and let everyone know about the results.
I haven't used the log2rrd tool, but if it's syntax is like 99% of linux commands, you should just be able to do something like this...no need to write another script:

Code: Select all

$ find *.log -exec log2rrd.pl {} \;
To decipher - it'll list all files with a .log extension and then run log2rrd.pl on them.
pfarmer
Posts: 4
Joined: Thu Jun 16, 2005 9:46 pm

Post by pfarmer »

hi shadow1979,

I was using MRTG before Cacti - I couldn't be bothered stuffing around with converting MRTG to CACTI so i just manually added each of the 53 routers that I monitor into CACTI (and every interface) which took me around 45 minutes.

I recall doing this same thing when I setup MRTG - which was done by coding and that took me days ....

I'm glad I started from scratch as I'm VERY happy with the results.
cksrealm
Cacti User
Posts: 140
Joined: Sun May 08, 2005 5:45 pm
Location: Sydney,Australia
Contact:

Post by cksrealm »

Could someone post the log2rrd script in here as I dont hvae it on my Debian install and its something that I am going to need as making the final move from MRTG to Cacti next week,

Thanks
ServerTweak
Posts: 24
Joined: Sun Apr 02, 2006 7:00 pm

Re: Anyone moved from MRTG to Cacti

Post by ServerTweak »

i did, but to answer your question no
i just started oout frest from the boat
shadow1975 wrote:I am looking for anyone who has moved from the MRTG monitoring system over to Cacit and was wondering if they have been able to import the settings they had in MRTG into Cacti with out having to rebuild the monitoring setup with in Cacti?


:D :D :D
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest