[rrd-users] Re: Using CDEF

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Wed Jan 23 20:53:34 MET 2002


Rob Ford wrote:
> 
> 
> I hope someone can help with the following problem:
> 
> I have created my .rrd file and wrote a simple perl script that collects the data, updates the database and then outputs the graphs.  After much fiddling I have managed to get them outputing the graphs how I want them......except I want to use the feature used in the tutorial that changes the colour of the graph when it gets above a certain amount.

Simplistic approach:

DEF your datasource
CDEF it with a certain maximum value
AREA the original datasource in red
AREA the topped datasource in green

As long as the maximum is not reached, green will overlay red.
When the datasource is above maximum allowed, green will only
overlap a part of red.

DEF:orig=/path/to/rrd:a:AVERAGE
CDEF:good=orig,0,100,LIMIT
AREA:orig#FF0000
AREA:good#00CC00

HTH
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list