[rrd-users] Re: area color

Matt mjoyce at iinet.net.au
Tue Jun 6 15:14:16 MEST 2006


Thanks, this was really useful to me, but incorrect.

Should be...

DEF:a=temp.rrd:AVERAGE
CDEF:b=a,0,GE,UNKN,a,IF
CDEF:c=a,0,LE,UNKN,a,IF
AREA:b#FF0000
AREA:c#0000FF:temperature 

UN is a test and requires more operands.
UNKN is an operand.

Took me a while of messing about and reading up on RPN to figure it out.
http://en.wikipedia.org/wiki/Reverse_Polish_Notation

Thanks



> -----Original Message-----
> From: rrd-users-bounce at list.ee.ethz.ch 
> [mailto:rrd-users-bounce at list.ee.ethz.ch] On Behalf Of Alex 
> van den Bogaerdt
> Sent: Wednesday, 1 February 2006 2:10 AM
> To: rrd-users at list.ee.ethz.ch
> Subject: [rrd-users] Re: area color
> 
> On Tue, Jan 31, 2006 at 02:55:46PM +0100, Andras Horvai wrote:
> 
> > I'm monitoring the temperature of few cities. I'm using AREA to 
> > display the temperature on the grap and the color is red. 
> How could I 
> > solve that when the temperature goes below zero the color 
> of the area changes to blue too?
> 
> Paint two areas.  One area is red, the other is blue.
> With a CDEF, you make sure the red area displays numbers 
> above zero, or set the value to unknown.
> Similar, you set the blue area to numbers below zero, or unknown.
> 
> DEF:a=temp.rrd:AVERAGE
> CDEF:b=a,0,GE,UN,a,IF
> CDEF:c=a,0,LE,UN,a,IF
> AREA:b#FF0000
> AREA:c#0000FF:temperature
> 
> Add the print statements you already had (printing "a", not b or c).
> 
> --
> Alex van den Bogaerdt
> http://www.vandenbogaerdt.nl/rrdtool/
> 
> --
> Unsubscribe 
> mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://lists.ee.ethz.ch/rrd-users
> WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 267.14.25/247 - Release 
> Date: 31/01/2006
>  
> 

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list