[rrd-users] Fetch the time of the first entry

Steve Shipway s.shipway at auckland.ac.nz
Tue Jul 1 22:43:49 CEST 2014


You seem to be misunderstanding how RRDTool works.

Remember that, after every update of an RRA, the oldest value is thrown away to make room for the new one.  So, the 'first' time (the timestamp of the oldest bucket in the RRA) will increase every time you update, as the last bucket is thrown away.

Also, the 'first' value is the oldest bucket, *whether or not it has been filled*.  So, if the RRA is 1 month long, then 'first' will be 1 month before the last update time, even if you have only updated once, since the buckets are implicitly created.

Remember RRDTool is not like an Oracle database -- it is not an every-increasing list of updates that starts at size 0 and gets constantly bigger.

Also, this is how to use a VDEF to get the value of the first 'foo' item in the foo.rrd, using the most appropriate Average RRA for the timewindow:

DEF:foods:foo.rrd:foo:AVERAGE
VDEF:firstfoo:foods,FIRST
PRINT:foo


Steve


Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
s.shipway at auckland.ac.nz<mailto:s.shipway at auckland.ac.nz>
Ph: +64 9 373 7599 ext 86487

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20140701/8684b5c9/attachment-0001.htm 


More information about the rrd-users mailing list