[rrd-users] How to change CF in existing RRA

Alex van den Bogaerdt alex at ergens.op.het.net
Tue Apr 1 00:57:12 CEST 2008

On Fri, Mar 28, 2008 at 12:06:47AM +0100, Alex van den Bogaerdt wrote:
> On Thu, Mar 27, 2008 at 03:43:38PM -0600, rrd.4.lgetschel at spamgourmet.com wrote:
> > RRA:AVERAGE:0.5:7:336
> > RRA:AVERAGE:0.5:360:480  RRA:AVERAGE:0.5:1080:480
> > 2) I WANTED to keep 1 WEEK next, which should be 7:480 (7*3min=21min; * 
> > 480 = 10080min; so 7 days of data)
> >       But, I managed to create it as 7:336 which is only about 4.9 days 
> > of data (this graphs with an odd area view on the graphs I create)(336 
> > would be used for 30min(10:336) I followed my example too closely I think)
> > 3) Keep 30:480 (30*3min=90min; *480 = 43200min; so 30 days of data)
> > 4) Keep 90:540 (90*3min=270min; *480 = 129600min; so  90 days of data)
> > 5&6 ) similar for 1 year and 3 years of data
> You want more rows, and let everything stay the same?
> Then yes, rrdtool tune is what you want.


Big oops, sorry.

Its name is "resize", not "tune".  Sorry for the confusion.

Here's some help to make up for time lost.

Just so that you know: I did this on a live database of me, and used
copy/paste to get the information.

Run rrdtool info on your rrd.
Find the RRA you need to change. Remember its number.
Now run rrdtool resize.

rrdtool info meters.rrd

I see (amongst many more rows):
rra[3].cf = "AVERAGE"
rra[3].rows = 336

I'm going to change RRA number 3.

rrdtool resize meters.rrd 3 GROW 144

This command created database resize.rrd

Let's look at it with rrdtool info:

rrdtool info resize.rrd
rra[3].cf = "AVERAGE"
rra[3].rows = 480

When in doubt you can also run rrdtool dump on it and view the resulting
xml file.

Next and last step:

mv meters.rrd before_resize.rrd && mv resize.rrd meters.rrd && echo Done

This moves the original file just in case; if that works it renames
the new file to the original file, and if that works you see "Done".

Alex van den Bogaerdt

More information about the rrd-users mailing list