[rrd-users] changing step time?

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Sat Apr 10 15:13:06 CEST 2010


>> Eg, if you feed in values of 0,0,5,0,0 which all fit within one step
>> time, then the min, max, and average are all 1.
> This is a surprise! It would certainly appear at first glance that the 
> max/min were 5 & 1.

5 & 0, but yes, I can see why you would expect that.

Min, avg and max are defined for R(ound)R(obin)A(rchive)s which contain 
C(onsolidated)D(ata)P(oint)s, not for P(rimary)D(ata)P(oint)s. PDPs are just 
a rate during a fixed interval.

What is described above is how PDPs are built.

Nothing stops you from having step==1 second and no RRA where each CDP gets 
only one PDP. For instance: step==1, RRA each CDP==300PDPs, 
C(onsolidation)F(unction) MIN, same with AVERAGE, same with MAX.
You can now update anywhere in the 5-minute interval and still get MIN and 
MAX as you expect them.

>> Alex has some excellent tutorials at
>> http://www.vandenbogaerdt.nl/rrdtool/ - they explain a lot.
> I'll certainly go there now, thanks.

Old, but still relevant.


>> >2) Can I change step after the database is created?
>> >   - I setup one value for daily step size, but now want to do 
>> > twice-daily updates.
>> >   - Can I change step size, and just start inserting updates more 
>> > often?
>>
>> Don't think so.

Correct. The amount of time per CDP is the amount of PDPs per CDP multiplied 
by the amount of time per PDP. And the amount of time per PDP is what "step" 
defines. Altering "step" (which can be done) means altering your data.

Example: if you would change step from 3600 into 1800, then suddenly each 
CDP is valid for only half the time it used to be.

>> I think you have to dump the data then do one of two things :
>> 1) create a new database and feed the old data in
>> 2) edit the data and re-import it
> My data comes from a live feed source, is there any standard way to export 
> from rrd in a manner that allows re-import?
>
> I suppose one could write something that would do fetches from the old, 
> and updates into the new.

The biggest challenge is to get MIN and MAX correct.

>> You cannot go backwards in time. So to put historical data in, you
>> must doing before putting current data in.
> Ah; so update can be backwards in time, (negative time), but all inserts 
> must be in a forward sequence.
>
> (Seems like these things should be in the main documentation and 
> tutorial.)

It sort of follows from the way RRDtool works. If you think you can make the 
manual and/or tutorials more clear on this, I'm sure Tobi will accept 
changes from you.

cheers,
Alex



More information about the rrd-users mailing list