[rrd-users] Zero length var-string is converted to 0 instead of NaN

Fabian shony at nurfuerspam.de
Wed Oct 15 19:03:26 CEST 2008


I'm using a small sh script to fill my rrd database. 
for better understanding I echoed out the values before they were stored.
looks like this
 DEBUG stringlength: 4,3,0,0,4,3,2,2,2,2,9,8

You can see there are 2 values "missing". that's correct because they are not 
available for all data-source clients.

unfortunately rrdtool update won't convert these values to NaN instead it 
stores 0.000000+0. The Problem is, sometimes these values are really 0 
therefore setting min to 1 while creating the database won't help much.
Is it a bug or a feature?

For now I'm checking the length of the variables I'm going to store and set 
0-length ones manually to "NAN"

my new NAN values are accepted by rrdtool update and stored as NaN in the 

I don't think this is the professional way, or is it?
thanks in advance for any help or suggestions

More information about the rrd-users mailing list