[rrd-users] rrdtool 1.5 'don't understand' my previously working CDEF

Johan Ström johan at stromnet.se
Wed Feb 3 19:59:04 CET 2016


On 02/02/16 23:35, Steve Shipway wrote:
>> DEF:rawmax=myfile.rrd:value:MAX
>> CDEF:vmax=rawmax,85.00,EQ,NaN,rawmax,IF
> 'NaN' is not a valid RPN symbol in RRDTool.  You should use UNKN instead.
> Also watch out for typos like embedded spaces or doubled commas.
Tobi, Steve,

thanks for help! I tried replacing NaN with UNKN in one failing location 
now, and that worked.
I *did* try that the other day, but in another location. And this 
location still has an issue, even with UNKN. But this seems to be 
related to the use of "-" in the var names:

DEF:rawmaxout-north-air=file.rrd:value:MAX
CDEF:vmaxout-north-air=rawmaxout-north-air,85.00,EQ,UNKN,rawmaxout-north-air,IF

ERROR: don't understand 'rawmaxout-north,85.00,EQ,UNKN,rawmaxout-north,IF'

By replacing - with _, it now works great. However, I expected "-" to be 
a valid variable?

"Variable names (/vname/) must be made up strings of the following 
characters|A-Z, a-z, 0-9, -,_|and a maximum length of 255 characters."
http://oss.oetiker.ch/rrdtool/doc/rrdgraph_data.en.html

>
> CDEF:vmax=rawmax,85,EQ,UNKN,rawmax,IF
>
> This will convert 85 into unknown.  However, with this value potentially
> being a non-integer, due to Data Normalisation, the test may never return
> true (as 85.00001 is not equal to 85).  Maybe instead try...
>
> CDEF:vmax=rawmax,85,GE,rawmax,86,LT,AND,UNKN,rawmax,IF
>
> Though, I'm not sure what you're trying to achieve by only excluding value
> 85.
Hm, so even if I store exactly 85 (in a gauge), data normalization may 
turn this into something else?

The value 85.00 is used in my source device (1-Wire temp sensors) to 
indicate a read failure. I actually think I filter out this nowadays, 
this script has some legacy... so may not even be required here come to 
think about it!

Well, my current issue is resolved, may look into the above potential 
issue too.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20160203/6389e4c3/attachment.html>


More information about the rrd-users mailing list