[rrd-users] Can't get rid of NaN in rrd / rra

Chris Herrmann chris.herrmann at faredge.com.au
Tue Aug 15 00:39:23 CEST 2017


OK, got it with the excellent help of the folks @ ITPA www.ipta.org.au<http://www.ipta.org.au> . Basically the data value that I was putting in had a trailling \r\n. Finding this out was done with...

root at whisk:~# echo "$myvar" | od -a
0000000 0 . 7 8 cr nl
0000006

and:
printf "%f" "$myvar"
: invalid number.78
0.000000

This occurred because it was the last field (column) in the file, so "cut" was grabbing the carriage return as part of the last field.

I fixed it by adding an additional dummy field to the returned sql, so that instead of grabbing the last field in the data set I'm now grabbing the second last field.

So now I get:
echo "$myvar" | od -a
0000000 b nul fs 0 . 7 8 b nul gs nl
0000013

now which works OK and there's aggregate data appearing in rrds now.

--
Regards

Chris Herrmann
Far Edge Technology

p. 02 84251400
m. 0403 393309
http://www.faredge.com.au

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20170814/d1a2d9a1/attachment.html>


More information about the rrd-users mailing list