[rrd-users] RRD Not Storing Historical Gauge Data

Karl Fischer rrd-users at ficos.de
Tue Nov 4 18:16:47 CET 2008


William R. Lorenz wrote:
> Hi All,
> 
> I'm trying to create a GAUGE-like RRD, fill it with historical data, and 
> then graph the results.  Unfortunately, my graph simply returns NaNs, with 
> `rrdtool dump <file>` returning the same -- no useful data.  My hope is 
> that someone will spot an obvious flaw and may be able to help with this.
> 
>    rrdtool create host_1.rrd \
>      --start 1225580613 -s 60 \
>      DS:min:GAUGE:120:U:U \
>      DS:avg:GAUGE:120:U:U \
>      DS:max:GAUGE:120:U:U \
>      DS:dev:GAUGE:120:U:U \
>      DS:avl:GAUGE:120:U:U \
>      RRA:AVERAGE:0.5:1:576 \
>      RRA:AVERAGE:0.5:6:672 \
>      RRA:AVERAGE:0.5:24:732 \
>      RRA:AVERAGE:0.5:144:1460 \
>      RRA:MIN:0.5:1:576 \
>      RRA:MIN:0.5:6:672 \
>      RRA:MIN:0.5:24:732 \
>      RRA:MIN:0.5:144:1460 \
>      RRA:MAX:0.5:1:576 \
>      RRA:MAX:0.5:6:672 \
>      RRA:MAX:0.5:24:732 \
>      RRA:MAX:0.5:144:1460
> 
>    rrdtool update host_1.rrd 1225580613:161.429:163.724:167.428:2.055:100
>    rrdtool update host_1.rrd 1225581006:159.928:161.264:163.551:1.513:100
>    rrdtool update host_1.rrd 1225581366:160.575:163.766:165.816:1.926:100
>    rrdtool update host_1.rrd 1225582026:159.407:161.301:163.695:1.926:100
>    rrdtool update host_1.rrd 1225582686:159.901:161.596:164.051:1.879:100
>    rrdtool update host_1.rrd 1225583106:159.436:161.427:164.972:2.233:100
>    [...more...]
> 
> While I find only NaN entries in the graph and via `rrdtool dump`, the 
> `rrdtool info` command returns at least a last_ds which seems reasonable:
> 
>    ds[min].type = "GAUGE"
>    ds[min].minimal_heartbeat = 120
>    ds[min].last_ds = "159.436"
>    ds[min].unknown_sec = 6
> 
> Because this is historical data, could this be a problem with rrdtool 
> checking the system clock when inserting gauge data into the RRD file?
> 
> Thanks, in advance, for any insights.

Dear William,

you have defined a heartbeat of 120, but your datapoint are much more than 120s
apart which results in NaN - perfectly valid.

Try to increase your heartbeat to a value large enough for the biggest step between
your datapoints, e.g. 1200 or larger - that'll make it work.

   rrdtool create host_1.rrd \
     --start 1225580613 -s 60 \
     DS:min:GAUGE:1200:U:U \
     DS:avg:GAUGE:1200:U:U \
     DS:max:GAUGE:1200:U:U \
     DS:dev:GAUGE:1200:U:U \
     DS:avl:GAUGE:1200:U:U \
     ...


hth

Rgds

- Karl



More information about the rrd-users mailing list