[rrd-users] Tips and thoughts on how to optimally import data points from MRTG .log files into new RRD databases

Alex van den Bogaerdt alex at ergens.op.het.net
Wed Jul 9 02:25:35 CEST 2008

On Tue, Jul 08, 2008 at 04:13:50PM +0200, Cyrille Bollu wrote:

> We are using MRTG for more than 2 years here and I would like to import 
> all the data collected during these 2 years into newly created RRD 
> databases.


> I know that I can convert my MRTG .log file to RRD databases by adding the 
> "LogFormat: rrdtool" line in MRTG's configuration files. However, the RRA 
> generated by doing this don't satisfy me.

I don't remember when/where/what, but I'm almost 100% sure I've seen
a solution for this.  Try google.

[snip: want MAX,AVERAGE and MIN]

MRTG doesn't store minimum rates seen, so you can't import that into
RRDtool. New rates will be stored including minimum rates seen.

> I'm thinking about doing something as follow:
>                  step 1: convert MRTG .log file to .rrd databases
>                              ( the "LogFormat: rrdtool" line)
>                                               |
>                                              V
>           step 2a: export .rrd databases generated using AVERAGE CF
>                                     (rrdtool xport ...)
>                                               |
>                                              V
>               step 2b: create new rrd databases with correct RRA
>                                               |
>                                              V
> Step 3: update newly created rrd databases with data exported in step 2a
>         (custom script to run "rrdtool update" with data from step 2a)
> But is it really the best solution? 

I suggest looking in MRTG or RateUp, find the part where it creates the
new database and modify that part.

Alex van den Bogaerdt

More information about the rrd-users mailing list