[rrd-users] Re: how to fill with previous value when graph

Alex van den Bogaerdt alex at ergens.op.het.net
Thu May 15 14:38:04 MEST 2003


On Thu, May 15, 2003 at 08:14:47AM -0400, Dan McGinn-Combs wrote:
> I see, so you don't want to manipulate the data in the consolidated
> portion of the RRA, you want to manipulate the data *before* it gets
> consolidated.
> 
> I think that'd be a question for Alex.... :-)

I think I already answered a similar question recently.

Same answer written in a more elaborate way:

RRDtool always updates data *after* it happened.
This means if the rate is "x" and if you didn't set the previous
three intervals and if the "heartbeat" setting allows for it, all
previous intervals will be set to the current rate "x".

If this is undesired behaviour, the front end has to remember the
"correct" rate (or fetch it from the database) and use that rate
to set the previous but not current interval.

1	defined by an "rrdtool update" call with rate "a"
2	defined by an "rrdtool update" call with rate "b"
3	defined by an "rrdtool update" call with rate "c"
4	not yet defined
5	not yet defined
6	not yet defined

Now, if interval 6 is going to be defined (rate "d") and if the
heartbeat allows for it, intervals 4,5 and 6 will be set to rate "d".

This is undesired, then do:

-1- find the last known rate "c"
-2- update intervals 4 and 5 with rate "c"
-3- update interval 6 with rate "d"

Step (2) will have to be done using "rrdtool update 12345:"... where
12345 is the appropriate time stamp.

Step (1) can be done by remembering the last value given to rrdtool
(the easy way) or by querying rrdtool using "rrdtool fetch" (this is
the hard way).

A similar (in fact: the same) problem has been discussed many moons
ago; it had to do with modem lines in use.  Google is your friend.


The story is completely different if the user wants to *graph* this
data (without doing the actual update as described above):

1	defined by an "rrdtool update" call with rate "a"
2	defined by an "rrdtool update" call with rate "b"
3	defined by an "rrdtool update" call with rate "c"
4	not yet defined
5	not yet defined
6	not yet defined

If the graph should include intervals 1 through 6, I don't see
how this can be done without a very complex CDEF, if at all possible.
Doing so would mean rrdtool should graph unknown data as if it wasn't
unknown.  

Alex

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