<div>I use three color stacks for my temperature readings, and also have a background (bg) color for the graph. The main thing is to define the color as unknown if it doesn't fall in the range you want to use for it.</div>
<div>============================</div><div><br></div><div>'CDEF:bg=cpu,UN,0,cpu,IF,0,GT,UNKN,INF,IF',</div><div>'AREA:bg#DDDDDD:',</div><div>'CDEF:cool=cpu,40,LE,cpu,UNKN,IF',</div><div>'CDEF:warm=cpu,40,60,LIMIT',</div>
<div>'CDEF:hot=cpu,60,GE,cpu,UNKN,IF',</div><div>'AREA:cool#B0F5EC:"Cool "',</div><div>'AREA:warm#FFCC00:"Warm "',</div><div>'AREA:hot#CC3300:"Hot \\n"',</div>
<div>'VDEF:maxC=cpu,MAXIMUM',</div><div>'VDEF:minC=cpu,MINIMUM',</div><div>'VDEF:avgC=cpu,AVERAGE',</div><div>'GPRINT:minC:"Min %2.1lf"',</div><div>'GPRINT:maxC:"Max %2.1lf"',</div>
<div>'GPRINT:avgC:"Avg %2.1lf Celsius \\n"',</div><div>'LINE1:cpu#660000:',</div><div>'HRULE:60#FF0000',</div><div>==============================</div><div><br></div><div>Kelly</div><div>
<br></div><div><br></div><div><div class="gmail_quote">On Wed, Aug 11, 2010 at 8:43 AM, <span dir="ltr"><<a href="mailto:Matt.Garrett@shell.com">Matt.Garrett@shell.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Folks</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I am monitoring some Temperature props.</p>
<p class="MsoNormal">At the moment graph looks nice with multi AREA stack but
what I would really like is to see the graphs change color</p>
<p class="MsoNormal">e.g. Temperature range is 0 – 100</p>
<p class="MsoNormal">Green stack of 0 – 30</p>
<p class="MsoNormal">Orange stack 30 – 50</p>
<p class="MsoNormal">Dark Orange 50 -70</p>
<p class="MsoNormal">Dark Red 70 – 100</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Current graphs statement looks like</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE
" ;</p>
<p class="MsoNormal">$def[1] .= "CDEF:sp1=var1,100,/,12,* " ;</p>
<p class="MsoNormal">$def[1] .= "CDEF:sp2=var1,100,/,30,* " ;</p>
<p class="MsoNormal">$def[1] .= "CDEF:sp3=var1,100,/,50,* " ;</p>
<p class="MsoNormal">$def[1] .= "CDEF:sp4=var1,100,/,70,* " ;</p>
<p class="MsoNormal">$def[1] .= "AREA:var1#FF5C00:\"Ambient Zone\"
" ;</p>
<p class="MsoNormal">$def[1] .= "AREA:sp4#FF7C00: " ;</p>
<p class="MsoNormal">$def[1] .= "AREA:sp3#FF9C00: " ;</p>
<p class="MsoNormal">$def[1] .= "AREA:sp2#FFBC00: " ;</p>
<p class="MsoNormal">$def[1] .= "AREA:sp1#FFDC00: " ;</p>
<p class="MsoNormal">$def[1] .= "LINE1:var1#000000:\"\" " ;</p>
<p class="MsoNormal">$def[1] .= "GPRINT:var1:LAST:\"%3.4lg %s$UNIT[1]
LAST \" ";</p>
<p class="MsoNormal">$def[1] .= "GPRINT:var1:MAX:\"%3.4lg %s$UNIT[1]
MAX \" ";</p>
<p class="MsoNormal">$def[1] .= "GPRINT:var1:AVERAGE:\"%3.4lg
%s$UNIT[1] AVERAGE \" ";</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">What I think I need are some form of IF statements to change
the color over a certain value.</p>
<p class="MsoNormal">Does anybody have any examples they could share.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Matt</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size:10.0pt">Matthew Garrett</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> <br>
</span><span style="font-size:10.0pt">Subsurface
Remote Site Support Engineer</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> <br>
</span><span style="font-size:10.0pt">Shell
Information Technology International B.V.</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> <br>
</span><span style="font-size:10.0pt">PO Box
60, 2280 AB Rijswijk-ZH, The Netherlands</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> </span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt">Tel:</span></b><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> </span><span style="font-size:10.0pt">+31(0)70 447 4369</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> <br>
</span><b><span style="font-size:10.0pt">Email:</span></b><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> </span><span style="font-size:10.0pt"><a href="mailto:Matt.Garrett@shell.com" target="_blank">Matt.Garrett@shell.com</a></span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> <br>
</span><b><span style="font-size:10.0pt">Internet:</span></b><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> </span><span style="font-size:10.0pt"><a href="http://www.shell.com" target="_blank"><span style="color:blue">http://www.shell.com</span></a></span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""> </span></p>
</div>
</div>
<br>_______________________________________________<br>
rrd-users mailing list<br>
<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br>
<a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>K.D. Lucas<br><a href="mailto:kdlucas@gmail.com">kdlucas@gmail.com</a><br>
</div>