[collectd] Collectd timeinterval datarecording in RRDTool
collectd at faxm0dem.org
Fri Feb 8 13:30:31 CET 2013
On Thu, Feb 07, 2013 at 02:58:30PM +0100, Frederic Daguenet wrote:
> Can you show the calculation in simple steps?
You want 4 timespans, so you need to enumerate them in the config, e.g.:
# first 3 days
# the next 7 days
# the following 30 days
# "the rest" well, this can't be infinity
RRATimespan <seconds until retirement>
Now as for the resolution, you can't have the fine grained control you're
asking. rrdtool and rrdcached plugins only allow for one global resolution
parameter which affects all RRATimespans: the RRARows parameter (let's
assume the StepSize is unspecified, which is the sanest).
By default, RRARows is 1200, which means the resolution for our first RRA is
(from the manpage): PDPs = timespan / (stepsize * rrarows) = 259200 / (10 *
1200) = 21.6 (assuming step is 10s), which will get rounded to 22 I guess.
This means you'll end up with 22 steps of 10 seconds being consolidated into
one point, i.e. your resolution for the 3 days will be 220 seconds i.e.
hardly 3.5 minutes. If you want 1 minute resolution for three days, you'll
need to increase RRARows to 1200 * 22 * 10 / 60 = 4400:
However, you can only have one RRARows parameter, so this will affect all 3
other timespans. Let us see what resolution that will yield for each one of
resolution(3 days) = 259200 / 4400 = 59 seconds
resolution(7 days) = 604800 / 4400 = 2.3 minutes
resolution(30 days) = 2592000 / 4400 =~ 10 minutes
resolution(30 years) = 30*365.24*86400 =~ 2.5 days
Luckily that's close enough to what you asked for. If you need the exact
values you'll have to create the RRDs yourself, and have collectd-rrdtool
feed them (but not create them).
IMHO the rrdtool/rrdcached plugins should mimic the rrdtool configuration
options. I guess the authors wanted to simplify the already complicated
rrd_create configuration. However it would seem this has the opposite effect
to confuse the user even more...
Hope this helps (and hoping my quick numbers are not too far from
More information about the collectd