[rrd-users] rrdtool 1.5 'don't understand' my previously working CDEF
tobi at oetiker.ch
Mon Feb 8 13:55:45 CET 2016
Wednesday Johan Ström wrote:
> 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:
> 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."
in that case the documentation needs to be fixed I guess ... :)
> > 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
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch tobi at oetiker.ch +41 62 775 9902
More information about the rrd-users