[rrd-users] Error in database?

Mats Gustafsson gentoo at mats-gustafsson.se
Thu Mar 5 09:20:30 CET 2009


I created two databases which are identical but have different number of
rows, i.e. it is only the number of rows in RRA:AVERAGE that differs. I
then fed them with identical data at identical timestamps, but when I
try to read their AVERAGE values I can only fetch data from one of them.
I just don't understand this...

The first database was created like this:
STORAGE=/home/mats/
RRDFILE=measure10.rrd

rrdtool create ${STORAGE}/${RRDFILE} \
        --step  120\
        DS:temp3:GAUGE:200:-55:125 \
        DS:humi3:GAUGE:200:0:100 \
        DS:dew3:GAUGE:200:-55:125 \
        DS:spare1:GAUGE:200:U:U \
        DS:spare2:GAUGE:200:U:U \
        DS:spare3:GAUGE:200:U:U \
        DS:spare4:GAUGE:200:U:U \
        RRA:AVERAGE:0.5:5:2628000 \
        RRA:MAX:0.5:30:24 \
        RRA:MIN:0.5:30:24


And the second one like this:
STORAGE=/home/mats/
RRDFILE=measure11.rrd

rrdtool create ${STORAGE}/${RRDFILE} \
        --step  120\
        DS:temp3:GAUGE:200:-55:125 \
        DS:humi3:GAUGE:200:0:100 \
        DS:dew3:GAUGE:200:-55:125 \
        DS:spare1:GAUGE:200:U:U \
        DS:spare2:GAUGE:200:U:U \
        DS:spare3:GAUGE:200:U:U \
        DS:spare4:GAUGE:200:U:U \
        RRA:AVERAGE:0.5:5:20 \
        RRA:MAX:0.5:30:24 \
        RRA:MIN:0.5:30:24

I then updated both of them by hand a number of times:

$ rrdtool update measure10.rrd 1236236220:1:0:0:U:U:U:U
$ rrdtool update measure11.rrd 1236236220:1:0:0:U:U:U:U
$ rrdtool update measure10.rrd 1236236340:1:0:0:U:U:U:U
$ rrdtool update measure11.rrd 1236236340:1:0:0:U:U:U:U
$ rrdtool update measure10.rrd 1236236460:1:0:0:U:U:U:U
$ rrdtool update measure11.rrd 1236236460:1:0:0:U:U:U:U
$ rrdtool update measure10.rrd 1236236580:1:0:0:U:U:U:U
$ rrdtool update measure11.rrd 1236236580:1:0:0:U:U:U:U
$ rrdtool update measure10.rrd 1236236700:1:0:0:U:U:U:U
$ rrdtool update measure11.rrd 1236236700:1:0:0:U:U:U:U
$ rrdtool update measure10.rrd 1236236820:1:0:0:U:U:U:U
$ rrdtool update measure11.rrd 1236236820:1:0:0:U:U:U:U
$ rrdtool update measure10.rrd 1236236940:1:0:0:U:U:U:U
$ rrdtool update measure11.rrd 1236236940:1:0:0:U:U:U:U
$ rrdtool update measure10.rrd 1236237060:1:0:0:U:U:U:U
$ rrdtool update measure11.rrd 1236237060:1:0:0:U:U:U:U

I then took a look on the AVERAGE values:
$ rrdtool fetch measure11.rrd AVERAGE
...
1236236400: nan nan nan nan nan nan nan
1236237000: 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan nan
nan nan
1236237600: nan nan nan nan nan nan nan
1236238200: nan nan nan nan nan nan nan
1236238800: nan nan nan nan nan nan nan

$ rrdtool fetch measure10.rrd AVERAGE
...
1236236400: nan nan nan nan nan nan nan
1236237000: nan nan nan nan nan nan nan
1236237600: nan nan nan nan nan nan nan
1236238200: nan nan nan nan nan nan nan
1236238800: nan nan nan nan nan nan nan

So, above I don't get any AVERAGE values out from measure10.rrd.

If I make a dump from measure10.rrd (after some more updates) I can see
values there:
$ rrdtool dump measure10.rrd | egrep -i '2009-03-05'
...
<!-- 2009-03-05 08:00:00 CET / 1236236400 --> <row><v> NaN </v><v> NaN
</v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
<!-- 2009-03-05 08:10:00 CET / 1236237000 --> <row><v> 1.0000000000e+00
</v><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v><v> NaN </v><v>
NaN </v><v> NaN </v><v> NaN </v></row>
<!-- 2009-03-05 08:20:00 CET / 1236237600 --> <row><v> 1.9000000000e+00
</v><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v><v> NaN </v><v>
NaN </v><v> NaN </v><v> NaN </v></row>
<!-- 2009-03-05 00:00:00 CET / 1236207600 --> <row><v> NaN </v><v> NaN
</v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>

But, I can't fetch them:
$ rrdtool fetch measure10.rrd AVERAGE -s 1236237000 -e 1236237600
                          temp3               humi3                dew3
             spare1              spare2              spare3
 spare4

1236237600: nan nan nan nan nan nan nan
1236238200: nan nan nan nan nan nan nan

While from my smaller database I can:
$ rrdtool fetch measure11.rrd AVERAGE -s 1236237000 -e 1236237600
                          temp3               humi3                dew3
             spare1              spare2              spare3
 spare4

1236237600: 1.9000000000e+00 0.0000000000e+00 0.0000000000e+00 nan nan
nan nan
1236238200: nan nan nan nan nan nan nan

Any ideas?





More information about the rrd-users mailing list