[rrd-users] CDEF 0 in rrdtool graph

Jacques du Toit jacquesd at irisns.com
Tue Feb 14 20:07:37 CET 2017


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 <webmaster at ajeux.com> wrote:
> 
> Hi,
> 
> 
> 2017-02-14 19:44 GMT+01:00 SolarMan <hans at vega.demon.nl <mailto:hans at vega.demon.nl>>:
> 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
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20170214/2d2bea57/attachment-0001.html>


More information about the rrd-users mailing list