[rrd-users] Re: RRA and graph question

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sat Aug 11 02:04:23 MEST 2001


Michael Smith wrote:

> I want to start collecting weather data, i.e. temperature and
> had a question about creating my rrd file and graphing it.
> I would like to store 5 minute samples of the temperature as well
> as the daily temp min/avg/max.  Here is where the question comes in.
> I would like to store them all in one logical rrd file using something
> like...
> 
> rrdtool create temp.rrd -s300 DS:temperature:GAUGE:600:0:120
>     RRA:AVERAGE:.5:1:210816 RRA:MIN:.5:288:731 RRA:MAX:.5:288:731
>     RRA:AVERAGE:.5:288:731

You're storing 210816 rows of five minutes each.  This is 732 days.

> Is this legal?  It seems to create just fine and rrdtool info
> shows 4 RRAs.  If it is legal, how do you tell your graph
> to use the daily average RRA instead of the 5min average?

It is legal however currently it is not very useful.  Only when your
graph will have the following properties it wull use the daily
average for sure:
1) Both the start and end times are 00:00 UTC
2) Each pixel represents 86400 seconds worth of data

I'm not *entirely* sure this covers all cases.

It has to do with matching the "correct" RRA.  If the RRA is in
the same resolution as your graph, it is an exact match and it
will be used (hence rule #2).  If no exact match can be made, the
next best match will be used.  Matching will include both the start
and end times (make sure to use UTC time!) so asking 00:00 local
time will fail to match the daily RRA unless you happen to live in
a time zone equal to UTC.

[snip]

> in this case and use the 5 minute average in another graph,
> without having to create and maintain 2 different rrd files.
> Is this possible?

You can try different orders of the RRAs.  It may work, I don't
know.  With different orders I mean creating either using

> rrdtool create temp.rrd -s300 DS:temperature:GAUGE:600:0:120
>     RRA:AVERAGE:.5:1:210816 RRA:MIN:.5:288:731 RRA:MAX:.5:288:731
>     RRA:AVERAGE:.5:288:731

or 

  rrdtool create temp.rrd -s300 DS:temperature:GAUGE:600:0:120
      RRA:MIN:.5:288:731 RRA:MAX:.5:288:731 RRA:AVERAGE:.5:288:731
      RRA:AVERAGE:.5:1:210816

If you don't use the correct start and end times it will
use the 5-minute averages for sure.  If you set them correct, it
may just use the first, or last, matching RRA.  If you want to
look this up in the code, rrd_fetch_fn inside rrd_fetch.c is the
place.

cheers,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
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