<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello All,<div class=""><br class=""></div><div class=""><br class=""></div><div class="">Apologies if this has been covered before. I did a lot of searching but found nothing recent.</div><div class="">I’m wanting to log rain data. As such I get a get a value from my rain gauge that is a counter… The problem is that it’s a small counter… i.e. for the last few days it’s been sitting on 75.52 (millimetres).</div><div class=""><br class=""></div><div class="">Before I can update the RRD with the new values I need to convert it to an integer. I’ve chosen to multiply by 100 to keep the resolution the same.</div><div class=""><br class=""></div><div class="">I came across the following post from 2007 identifying the same problem:</div><div class=""><br class=""></div><div class=""><a href="http://git.net/ml/db.rrdtool.devel/2007-07/msg00007.html" class="">http://git.net/ml/db.rrdtool.devel/2007-07/msg00007.html</a></div><div class=""><br class=""></div><div class="">Here’s the relevant info and reply from Tobi.</div><div class=""><br class=""></div><div class="">------------------------------------</div><div class="">> I noticed this when looking into a problem one of my Hobbit users<br class="">> reported today. It seems that when you define a DS as a COUNTER,<br class="">> then it will only accept updates with integer values - except for<br class="">> the first time:<br class="">><br class="">> $ rrdtool create foo.rrd DS:virt:COUNTER:600:0:U RRA:AVERAGE:0.5:1:600<br class="">> $ rrdtool update foo.rrd N:10.5<br class="">> $ rrdtool update foo.rrd N:10.5<br class="">> ERROR: not a simple integer: '10.5'<br class="">><br class="">> It kind of makes sense that a counter must be an integer, but why does<br class="">> the first update work ok ?<br class=""><br class="">you are right ... the check in the code only kicked in when the<br class="">previous update was ! U ...<br class=""><br class="">r1171 has the fix …</div><div class="">------------------------------------</div><div class=""><br class=""></div><div class="">I could not find any info about r1171 but it seems at some point it was rolled back because the exact same problem still exists.</div><div class="">i.e. First entry works fine, second entry fails.</div><div class=""><br class=""></div><div class="">I wonder if anyone knows why this patch was rolled back or if there is a better way to do what I’m trying to do.</div><div class=""><br class=""></div><div class="">Thanks!</div><div class=""><br class=""></div><div class="">-Dan</div></body></html>