PeterFox
PeterFox

Reputation: 19

Using RRDtool without consolidation function

I want to use rrdtool as a ringbuffer which simply forgets the oldest value if a new value arrives and RRA is full. Is this even possible?

Example:

rrdtool create database.rrd --step 1  DS:data1:GAUGE:5:U:U RRA:<CF>:0.5:1:1200 

After 20 min the oldest value gets replaced.

Thank you and greetings,

Peter

Upvotes: 0

Views: 615

Answers (1)

Steve Shipway
Steve Shipway

Reputation: 4027

You can render the consolodation function null by using a 1-step RRA of AVG type, as in your example.

However, what you cannot do so simply is nullify the time series and data normalisation.

Your data need to arrive exactly on a step boundary or they will be adjusted to fit to one, changing their value. Your example uses a 1s step, which makes that much simpler; however it brings up the next problem...

RRDTool will always store a value in the RRA at each consolodated step. If there are no data available then you will get an Unknown, or a value will be extrapolated based on previous data. In your setup, you have an XFF=0.5 which means you'll get an unknown when no data were stored.

So, it is possible, but the RRA will ALWAYS have 1200 values in it. If a sample did not arrive during a particular second, then an Unknown will be stored. Samples will be dropped as soon as they are 20min old regardless of how many new samples were collected in that time window; when you query the RRA, you will get 'unknown' if nothing was collected during that second.

Whether this behaviour matches your use case requirements or not is up to you.

Upvotes: 1

Related Questions