[rrd-users] generate monthly average from irregular daily input

Jonas Gehring g.jjoe64 at gmail.com
Fri Jul 26 11:06:52 CEST 2013


Hi,

could anybody help me with this (see topic)? I'm slowly getting crazy ....


Daily I get input (prices), but at some days I don't get prices (for
example Sundays).
Now, I want to get the average price for every month (30 days) (the average
should ignore the days where I don't get prices).

What I did:
create:

rrdtool create filename.rrd \
>
> > --step '86400' \
>
> > --start '1356998400' \
>
> > 'DS:price:GAUGE:86400:U:U' \
>
> > 'RRA:AVERAGE:0.99:30:2'
>
>
>
 fill:

> rrdtool update filename.rrd 1357365600:5 1358229600:4 1359698400:5
> 1359871200:6 1361340000:4
>

and fetch:

jonas at jonas-ThinkPad-T410:/tmp/3$ rrdtool fetch filename.rrd AVERAGE -s
> 1356998400 -e 1361340001

                          price


> 1358208000: -nan

1360800000: -nan

1363392000: -nan





And the result is NaN for every month. What am I doing wrong?

Thanks!

Cheers, Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130726/f3c15c76/attachment-0001.htm 


More information about the rrd-users mailing list