[rrd-users] rrd graph inter/extrapolation of large U / NaN blocks

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Wed Feb 27 23:07:39 CET 2013


You are asking for a straight line between two points in time. What is not 
really clear (to me at least) is if you want a straight horizontal line, 
continuing the last known update, or if you want a sloped line.

Other approaches, in addition to what Steve already suggested:

In case of a straight horizontal line repeating the last known value:
Your update program could remember and fill in the last known update, and 
just keep feeding that to your RRD every 5 minutes.

In case of a sloped line:
At 8am CET the first update is a special case. Read the last known value 
from the database, using rrdgraph with a PRINT statement, or get it using 
external sources, compute the difference between closing and opening, divide 
by the number of 5-minute periods (which will NOT always be 168, think about 
daylight saving!) and do the 168, or 156, or 180 updates. This would be a 
function of your script around RRDtool, not for RRDtool itself.

just thinking out loud, HTH
Alex

----- Original Message ----- 
From: "Joachim Larsson" <joachim.larsson at ericsson.com>
To: <rrd-users at lists.oetiker.ch>
Sent: Wednesday, February 27, 2013 2:49 PM
Subject: [unsure] [rrd-users] rrd graph inter/extrapolation of large U / NaN 
blocks


Hello,

Im web-scraping a stock-market page which is only open daytime, thus my 
rrd-database will have huge gaps in the data. I've been trying to make a 
CDEF that uses old values and tries to inter/extrapolate the gaps, but to no 
avail.

Can anyone shed some light regarding converting U to a straight line between 
the previous and last successful rrd data?

I create the rrd with the following;
rrdtool create stocklol.rrd --start $starttime -s 300\
DS:latest:GAUGE:600:0:U \
DS:volume:COUNTER:600:0:U \
RRA:AVERAGE:0.5:1:8640 \
RRA:AVERAGE:0.5:4:52560

The data is being updated 0800 -> 1800 CET, all other values are NAN / U

Google and other sources doesnt hint on this, as far as i could tell. Alot 
of refrences to making unknown into 0, but that's absolutely not what i 
want. I checked the CDEF and RPN docs refrenced in rrdgraph pages.

Sincerely,
Joachim






--------------------------------------------------------------------------------


> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
> 



More information about the rrd-users mailing list