[rrd-users] One-off and no-data-problem

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Thu Dec 30 12:51:16 CET 2010


>      # Create database
>      rrdtool create $RRD \
>          --start 2999999999 --step $STEP \
>          DS:a:GAUGE:$HB:U:U \
>          RRA:AVERAGE:0.5:1:1000
>
>      # Do a single update
>      rrdtool update $RRD \
>          3000000400:123

This timestamp is inbetween two 'natural boundaries' so to speak.
Remember this for furtheron.

>      # Fetch data and print to stdout
>      rrdtool fetch $RRD \
>          --start 3000000000 --end 3000000900 AVERAGE
>
> I would expect this to print three (or perhaps four, not sure about the
> last one) values like this:
>
>      3000000000: -nan
>      3000000300: 123
>      3000000600: -nan
>      3000000900: -nan
>
> But this is what I get:
>
>      3000000300: -nan
>      3000000600: -nan
>      3000000900: -nan
>      3000001200: -nan
>
> So there's three differences:
>
> 1. Why does the fetch command start at 300, instead of 0?

You get the interval which starts at 3000000000 and ends at 3000000300.
The timestamp shown is that of the end.

> 2. Why does the fetch command include not only the last step (900) but
> also one more (1200)?

This is incorrect, and probably you are using an old version.

> 3. Why was not the updated value accepted?

The interval starting at 3000000300 and ending at 3000000600 is partially
defined, rate 123 between 3000000300 and 3000000400. There is no further
update, so the PDP is not yet created, and therefore there also is no CDP
yet.

If you do an update at or after 3000000600 then you will see that 123 is
actually accepted as a rate, probably not immediately recognizable due to
normalization.

The interval starting 3000000000 and ending 3000000300 should, as far as I
can see right now, also have a known rate of 123. This because the 'last
update' time should be 2999999999 or 3000000000 before your first update,
and the update at 3000000400 is less than $heartbeat away. But I could be
missing something here.


See my site, http://www.vandenbogaerdt.nl/rrdtool for an explanation of
PDP, CDP, normalization and so on.



HTH
Alex



More information about the rrd-users mailing list