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
-- 
   __________________________________________________________________
 / [EMAIL PROTECTED]                  [EMAIL PROTECTED] \
| 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:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to