[rrd-users] First gauge value isn't stored - what am I doing wrong?

Joachim Schrod jschrod at acm.org
Mon Nov 30 18:08:20 CET 2009


Hi,

I'm new to rrdb and have a problem to store gauge data. Googling
and reading the list archives didn't help me, so I'm asking you for
help... ;-)

With the following RRD:

    rrdtool create test.rrd --start '00:00 24.11.2009' \
        --step 86400 DS:count:GAUGE:172800:0:U RRA:MAX:0.9:1:30

I want to create an RRD for daily measurements, where 30 PDPs are
kept and no consolidation data points. (I want to create statistics
about the amount of documents in a database.)

Now I simulate the 1st measurement:

    rrdtool updatev test.rrd '00:30 24.11.2009'@1573

Looking at rrdtool info, I see that this has been received as the
current ds value:

    puma:data $ rrdtool info test.rrd
    filename = "test.rrd"
    rrd_version = "0003"
    step = 86400
    last_update = 1259019000
    ds[count].type = "GAUGE"
    ds[count].minimal_heartbeat = 172800
    ds[count].min = 0.0000000000e+00
    ds[count].max = NaN
    ds[count].last_ds = "1573"
    ds[count].value = 2.8314000000e+06
    ds[count].unknown_sec = 82800
    rra[0].cf = "MAX"
    rra[0].rows = 30
    rra[0].cur_row = 1
    rra[0].pdp_per_row = 1
    rra[0].xff = 9.0000000000e-01
    rra[0].cdp_prep[0].value = NaN
    rra[0].cdp_prep[0].unknown_datapoints = 0

Now, 2nd measurement the next day:

    puma:data $ rrdtool updatev test.rrd '00:30 25.11.2009'@1574
    return_value = 0
    [1259020800]RRA[MAX][1]DS[count] = NaN

Oops? Why is NaN stored here for the Nov 24 value?
Yet the 3rd measurement causes the 2nd to be stored, as expected.

    puma:data $ rrdtool updatev test.rrd '00:30 26.11.2009'@1575
    return_value = 0
    [1259107200]RRA[MAX][1]DS[count] = 1.5740208333e+03

And really, the 1st data point 1573 from Nov 24 is missing:

    puma:data $ rrdtool fetch test.rrd -s '00:00 24.11.2009' \
                   -e '00:00 27.11.2009' MAX
                               count

    1259020800: nan
    1259107200: 1.5740208333e+03
    1259193600: nan
    1259280000: nan

What am I doing wrong? Why was 1573 not stored, but NaN?

Sorry if that is common knowledge, but I fought already for 2 hours
with that simple beginner's stuff, yet new to me, and I can't
succeed in storing the 1st value in a time series. Quite
frustrating... :-(

Cheers, and thanks in advance for any help,

	Joachim

PS: This is rrdtool 1.3.4 from openSUSE 11.1, in case that matters.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod				Email: jschrod at acm.org
Roedermark, Germany



More information about the rrd-users mailing list