Hi Oliver

I’m afraid you’ll always need a DEF from somewhere. I’ve done plenty of 
workarounds like this, including having an empty rrdfile that is never updated. 
Usually I end up doing something like this to get just a 0 value...

DEF:foo=/some/empty/rrdfile.rrd:foo:AVERAGE
CDEF:myval=foo,POP,0

Hope that helps :)

Cheers,
  Jacques

> On 14 Feb 2017, at 20:49, Olivier Doucet <[email protected]> wrote:
> 
> Hi,
> 
> 
> 2017-02-14 19:44 GMT+01:00 SolarMan <[email protected] 
> <mailto:[email protected]>>:
> Hello Olivier,
> The error message is confusing and should actually read:
> rrdtool.OperationalError: rpn expressions without DEF or CDEF variables are
> not supported
> as it does in other cases.
> The meaning is clear: you must use a DEF or CDEF in your CDEF definition.
> Regards,
> hans
> 
> Thank you Hans for your quick response. I understand the documentation is 
> wrong then.
> 
> Any idea how to easily create a DEF with 0 value all along ? I'm using it in 
> a automatized script that write the whole 'rrdtool graph' line, and when 
> original DEF file is not present, I would like to replace it with 0 to keep 
> the same logic.
> 
> Olivier
> 
> 
> _______________________________________________
> rrd-users mailing list
> [email protected]
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Reply via email to