[rrd-users] display a value only if it fits into the current scale

Karl Fischer rrd-users at ficos.de
Fri Jul 4 21:50:12 CEST 2008

Karl Fischer wrote:
> Alex van den Bogaerdt wrote:
>> On Fri, Jul 04, 2008 at 01:43:45PM +0200, Karl Fischer wrote:
>>> I'm using rrdtool 1.23 and I'd like to display a value as LINE1 *only*
>>> if it fits into the current scale without affecting the scale (pretty
>>> much like HRULE, however, the value is going to be calculated and may
>>> change over time, so I can't use HRULE ...
>>> Therefor I need to know, what my current (y) scale is, so I tried to
>>> use MAXIMUM as a workaround, but that doesn't work since VDEF variables
>>> cannot be used in CDEF as it seems ... :-(
>>> theoretical idea to display a warning line at 90% of max cap only if
>>> the used cap gets any near the 90% limit (so the warning line itself
>>> doesn't affect the scale):
>>> DEF:maxcap=some.rrd:maxcapacity:LAST
>>> DEF:usedcap=some.rrd:usedcapacity:LAST
>>> CDEF:warnlimit=maxcap,0.9,*
>>> CDEF:help=warnlimit,0.9,*
>>> VDEF:usedmax=usedcap,MAXIMUM
>>> CDEF:warnline=usedmax,help,GT,warnlimit,UKNN,IF  # this doesn't work
>>> AREA:usedcap#0000ff:used capacity
>>> LINE1:warnline#ff0000:90% full
> Thanks Alex for looking into it ...


I'm sorry, I fooled myself ... :-(
Your example does exactly what I want ...

Thank you.

- Karl

More information about the rrd-users mailing list