[rrd-users] Re: RPN for thresholds colors for LINE graphs
Alex van den Bogaerdt
alex at slot.hollandcasino.nl
Tue May 29 14:15:43 MEST 2001
Sasha Mikheev wrote:
>
> I have 2 thresholds: normal and high.
> Algorithm should be following:
>
> if (x < normal)
> color = green
> if(normal < x < high)
> color = yellow
> if(x > high)
> color = red
>
> For AREA type graphs I can do it just fine. However there is a problem
> with LINE type graphs. When I implement this algorithm for LINE graphs I
> get multiple disconnected segments because my CDEF takes point which is
> less then threshold and the next point is greater then threshold.
What happens here is that the green line ends, the yellow line or the
red line begins on another place on the y-axis. Correct?
I think you can just continue to plot the green line and overlay this
with the yellow and/or red line:
DEF:green=/path/to/your.rrd:etcetera
CDEF:yellow=green,FirstThreshold,MaximumNumber,LIMIT
CDEF:red=green,SecondThreshold,MaximumNumber,LIMIT
LINE1:green#00CC00:"Legend"
LINE2:yellow#FFFF00:"Legend"
LINE3:red#FF0000:"Legend"
(fill in the appropriate values for the thresholds and the maximum)
You can always use other CDEFs to generate the appropriate numbers
to be used inside GPRINTS et al.
Please let us all know if this works for you.
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