[rrd-users] wrong rra used

Simon Hobson linux at thehobsons.co.uk
Thu Jun 26 12:27:40 CEST 2014


spock <collector at sappers.de> wrote:

> I am using this database to collect temperature data for a swimming pool.
> I want to keep the detailed data for 36 months ("103680 * 900sec") but also
> want to have a daily average temp (96 values = 24h).
> 
> # rrdtool create temp_pool.rrd --step 900 --start "20140101 00:00" \
> # DS:air:GAUGE:1200:-40:50 \
> # DS:flow:GAUGE:1200:-40:50 \
> # DS:return:GAUGE:1200:-40:50 \
> # DS:delta:COMPUTE:return,flow,- \
> # DS:pump_flag:GAUGE:1200:0:1 \
> # DS:heat_flag:GAUGE:1200:0:1 \
> # DS:device:GAUGE:1200:0:90
> # RRA:AVERAGE:0.5:1:103680 \
> # RRA:MIN:0.5:96:3650 \
> # RRA:MAX:0.5:96:3650 \
> # RRA:AVERAGE:0.5:96:3650
> 
> When I create a graph with 
>       rrdtool graph temp7d.png \
>        -t "Pooltemp (Status $(date "+%d.%m.%Y %H:%M"))"  \
>        -s $graph_start_7d -e $timestamp_rounded_unix \
>        -w 640 -h 400 -D -a PNG -T 15\
>        DEF:airmax2=temp_pool.rrd:air:MAX \
>        DEF:airmin2=temp_pool.rrd:air:MIN \
>        DEF:airavg2=temp_pool.rrd:air:AVERAGE \
>        CDEF:airrange=airmax2,airmin2,- \
>        LINE2:airmin2#00FF00:"Luft Min" \
>        AREA:airrange#8dadf588::STACK \
>        LINE2:airmax2#00FF00:"Luft Min" \
>        LINE2:airavg2#00FF00:Aussen
> 
> I get for airavg2 the datailed values - but not the daily average.
> Airmin2 and airmax2 work as  expected - there is no other RRA Archive to
> choose from.
> 
> Question (1)
> How do I convince the tool to use the consolidated data instead of the
> detailed?

It does the best it can to use the most detailed data. Looking at the docs, I don't see any option to override that.


> Question (2)
> When drawing the graph, the line for max/min values are not precisely
> aligned above a day. It looks like it starts about 900 secs after 0:00 each
> day.

Looks more like an hour to me, are you on +1 timezone by any chance ?

> How does rrdtool determine, which 96 values to consolidate? My data point
> are stored with rounded timestamps (e.g. 13.06.2014 0:00, 0:15, 0:30, etc.)

*ALL* periods are aligned to an integer multiple of step (or step * steps/CDP) since unix epoch (midnight 1-1-1970 UTC). So if you consolidate to a day then a "day" will always start at 00:00:00 UTC. If your timezone isn't UTC, then the data will appear to be off by your timezone offset.


> Question (3)
> The ssf factor is 0.5 for the RRAs. However, there is no min/max value for
> certain days with missing data, although there are only a few values
> missing. I am sure, is is not more than 50%. How can I check this.
> 
> <http://rrd-mailinglists.937164.n2.nabble.com/file/n7582214/temp7d.png> 

Are you certain you are updating frequently enough ? I can see some gaps in the data, if you have more than 1200s between updates then you'll have gaps.


For more on how consolidation is done, see this tutorial
http://www.vandenbogaerdt.nl/rrdtool/process.php



More information about the rrd-users mailing list