[rrd-users] Re: Storing data once a minute

Alex van den Bogaerdt alex at ergens.op.het.net
Wed Sep 11 22:59:07 MEST 2002


On Wed, Sep 11, 2002 at 01:22:59PM -0400, Mike Bragg wrote:
> 
> Hello,
> 
> 	I need to write data in an RRD databse every minute.  I've done the
> calculations, but would like a "rrd veteran" to double check my answer.  Any
> suggestions or help is greatly appreciated.

I hope I qualify as an RRD veteran :)

>  For 2days/2h,   50hrs*60 =    3000 points
>  For 12.5days,  300hrs*60 =   18000 points
>  For 50days,   1200hrs*60 =   72000 points
>  For 732days, 17568hrs*60 = 1054080 points
> 
> when I setup up the archive it should look like:
> "--step=60",
> "DS:input:GAUGE:120:U:U",
> "DS:output:GAUGE:120:U:U",
> "RRA:AVERAGE:0.5:1:3000",
> "RRA:AVERAGE:0.5:30:18000",
> "RRA:AVERAGE:0.5:120:72000",
> "RRA:AVERAGE:0.5:1440:1054080"

What you try to accomplish is this:

1) collect data each minute
2) store each minute in the first RRA
3) keep the same time of data as MRTG does

Correct?

If this is the case, I don't see why you keep that amount
of rows and at that resolution.


Approach the problem from the other side: What do you want to
display --> keep your data in the same resolution.  Also keep
just enough rows to display.

MRTG compatible RRDs were designed as follows:

The MRTG log is:
600 rows "daily" @ 5 minutes per row
600 rows "weekly" @ 30 minutes per row
600 rows "monthly" @ 2 hours per row
732 rows "yearly" @ 1 day per row

MRTG will use both the "daily" and "weekly" part of the log
when it needs to collect data for an image.  This means it
can, in total, use 600*5+600+30=21000 minutes worth of data.
This is because the "weekly" part of the log doesn't start
at "now", it starts at "now-50hours".

RRDtool will *not* combine different RRAs.  The "weekly" RRA
will start "now", not "now-50hours".  This means for an MRTG
compatible RRA you need to store 21000 minutes worth of data.
Normally this means 21000/30 = 700 rows at 6 PDPs per CDP.

The complete table:

600 rows "daily" @ 5 minutes per row
700 rows "weekly" @ 30 minutes per row
775 rows "monthly" @ 2 hours per row
797 rows "yearly" @ 1 day per row

Now, if you change the amount of time per PDP (which is what
you're doing), this doesn't necessarily mean that you want
to change the amount of time per graph.  If you "only" want
to be able to create an extra type of graph -let's call this
the "hourly" graph- all you need to do is this:

Keep the same amount of CDPs for each of the RRAs.  Since the
amount of time per PDP is less than usual, the amount of PDPs
per CDP must be more than usual.  The total amount of time
shouldn't change --> time per PDP is divided by 5, PDP per CDP
must be multiplied by 5 also.

To actually use the higher resolution data, you need an extra
RRA with 1 PDP per CDP.  Similarly to current MRTG practice,
I would use 600 rows of 1-minute.

The table thus becomes:
600 rows "hourly" @ 1 minute per row
600 rows "daily" @ 5 minutes per row
700 rows "weekly" @ 30 minutes per row
775 rows "monthly" @ 2 hours per row
797 rows "yearly" @ 1 day per row

To create this when "--step 60" is given:
 "RRA:AVERAGE:0.5:1:600",
 "RRA:AVERAGE:0.5:5:600",
 "RRA:AVERAGE:0.5:30:700",
 "RRA:AVERAGE:0.5:120:775",
 "RRA:AVERAGE:0.5:1440:797"

This allows you to display exactly the same amount of time as
MRTG will allow you to do, and it allows for an extra image of
upto 10 hours at 600 pixels.

HTH
Alex

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list