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

Jonatan Magnusson jonatan at cmteknik.se
Thu Dec 30 16:56:13 CET 2010


On 2010-12-30 12:51, Alex van den Bogaerdt wrote:
>>       # 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.

Ok, makes sense as long as you know it.

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


I was using 1.4.4. I've now tried with 1.4.5, with same result.


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

Now, this I just can't get my head around. I've read your tutorials and 
I think I understand most of it, but I'm still not sure just what is 
required to put a value in the database.

I've replaced the update-command with one at 3000000599 and one at 
3000000601 and now I get this output:

     3000000300: -nan
     3000000600: 1,2300000000e+02
     3000000900: -nan
     3000001200: -nan

But why is it necessary to supply two values for a gauge data point? And 
how long before or after must the values be supplied?

If I declare a database to have gauge datapoints with a step of 5 
minutes, I would expect it to be enough to supply one value for each 
5-minute interval ... ?

Or should I understand it like this: if I only supply one value, RRDtool 
does not know for how far in the future or past this value is valid. If 
I supply another value within the heartbeat time in the future, the 
first value is valid between those? And the value must be valid at the 
time boundary, so it is not enough to have a valid value *within* the 
step? Or maybe I'm way off .... :)


Regards,

Jonatan Magnusson



More information about the rrd-users mailing list