Discussion:
[rrd-users] Strange problem: data not updated?
(too old to reply)
Julf
2014-07-25 13:43:55 UTC
Permalink
I have a very strange issue that I just can't figure out. I have a simple
program that tries to update some temperature readings. These are some of
the calls to rddupdate:

<code>
Jul 25 15:05:39 rrdtool updatev rfx-tmp.rrd -t livingroom 1406293539:21.75
Jul 25 15:08:46 rrdtool updatev rfx-tmp.rrd -t livingroom 1406293726:22.0
Jul 25 15:09:50 rrdtool updatev rfx-tmp.rrd -t livingroom 1406293790:21.87
Jul 25 15:13:49 rrdtool updatev rfx-tmp.rrd -t library 1406294029:20.37
Jul 25 15:15:47 rrdtool updatev rfx-tmp.rrd -t library 1406294147:20.5
Jul 25 15:18:42 rrdtool updatev rfx-tmp.rrd -t office 1406294322:22.12
Jul 25 15:22:44 rrdtool updatev rfx-tmp.rrd -t office 1406294564:21.87
Jul 25 15:23:44 rrdtool updatev rfx-tmp.rrd -t office 1406294624:22.0
Jul 25 15:24:35 rrdtool updatev rfx-tmp.rrd -t library 1406294675:20.37
Jul 25 15:26:34 rrdtool updatev rfx-tmp.rrd -t library 1406294793:20.5
Jul 25 15:29:03 rrdtool updatev rfx-tmp.rrd -t attic 1406294943:22.12
Jul 25 15:29:30 rrdtool updatev rfx-tmp.rrd -t library 1406294970:20.37
Jul 25 15:30:29 rrdtool updatev rfx-tmp.rrd -t library 1406295029:20.5
Jul 25 15:31:28 rrdtool updatev rfx-tmp.rrd -t library 1406295088:20.37
Jul 25 15:32:27 rrdtool updatev rfx-tmp.rrd -t library 1406295147:20.5
</code>

The strange thing is that even using updatev, I don't get any output, only a
return status of "0".

Looking at the rrd file there is nothing there:

<code>
rrdtool fetch rfx-tmp.rrd AVERAGE -s -1d
office library attic
livingroom 3rdfloor neighbor

1406210400: -nan -nan -nan -nan -nan -nan
1406214000: -nan -nan -nan -nan -nan -nan
1406217600: -nan -nan -nan -nan -nan -nan
1406221200: -nan -nan -nan -nan -nan -nan
1406224800: -nan -nan -nan -nan -nan -nan
1406228400: -nan -nan -nan -nan -nan -nan
1406232000: -nan -nan -nan -nan -nan -nan
1406235600: -nan -nan -nan -nan -nan -nan
1406239200: -nan -nan -nan -nan -nan -nan
1406242800: -nan -nan -nan -nan -nan -nan
1406246400: -nan -nan -nan -nan -nan -nan
1406250000: -nan -nan -nan -nan -nan -nan
1406253600: -nan -nan -nan -nan -nan -nan
1406257200: -nan -nan -nan -nan -nan -nan
1406260800: -nan -nan -nan -nan -nan -nan
1406264400: -nan -nan -nan -nan -nan -nan
1406268000: -nan -nan -nan -nan -nan -nan
1406271600: -nan -nan -nan -nan -nan -nan
1406275200: -nan -nan -nan -nan -nan -nan
1406278800: -nan -nan -nan -nan -nan -nan
1406282400: -nan -nan -nan -nan -nan -nan
1406286000: -nan -nan -nan -nan -nan -nan
1406289600: -nan -nan -nan -nan -nan -nan
1406293200: -nan -nan -nan -nan -nan -nan
1406296800: -nan -nan -nan -nan -nan -nan
</code>

Any ideas/suggestions?




--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Strange-problem-data-not-updated-tp7582320.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
Steve Shipway
2014-07-25 23:03:51 UTC
Permalink
I think you are misunderstanding how to use the -t option, and as a result, have too many 'unknowns' in your database which combine to make unknowns entered into your RRA and so nothing updated.

If you have an RRD with 3 ds -- lets call them ds1, ds2 and ds3 -- then a normal update would be

rrdtool update $timestamp:$ds1value:$ds2value:$ds3value

which would update all DS for the time interval containing $timestamp (well, at least in part -- I'll get to that).

However, if you do this:

rrdtool update -t ds2 $timestamp:$ds2value

then what you are doing in effect is this:

rrdtool update $timestamp:UNKNOWN:$ds2value:UNKNOWN

So, when you update your database trying to set 'library' to one value, then to set 'attic' to another a few seconds later, you're actually telling RRDtool that 'attic' was unknown for a large part of the time and only the given value for the short period after. If, in addition, the DS is not a GAUGE type, then the rate cannot be calculated at all as the previous value was unknown. With all this unknown in place, then unless you have a very generous XFF setting on the RRA, all you'll get will be unknowns.

In short, when your data arrive at different times (as in this case) they should be in separate RRD files. So, create separate RRDs with a single DS in each, rather than one RRD file with 3 DS, since you want to update the various DS independently of each other.

Steve


Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
***@auckland.ac.nz
Ph: +64 9 373 7599 ext 86487
Johan Helsingius
2014-07-26 10:33:23 UTC
Permalink
Steve,
Post by Steve Shipway
I think you are misunderstanding how to use the -t option,
and as a result, have too many 'unknowns' in your database
which combine to make unknowns entered into your RRA and
so nothing updated.
Ah!
Post by Steve Shipway
In short, when your data arrive at different times (as in this
case) they should be in separate RRD files. So, create
separate RRDs with a single DS in each, rather than one RRD
file with 3 DS, since you want to update the various DS
independently of each other.
Sounds like the way to go! Thanks!

The strange thing is that my old setup worked just fine,
but ceased working when I migrated to a more modern machine
and linux distro.

Julf

Loading...