[rrd-users] How to change graph colour as Temperature increases
K.D. Lucas
kdlucas at gmail.com
Wed Aug 11 19:19:17 CEST 2010
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.
============================
'CDEF:bg=cpu,UN,0,cpu,IF,0,GT,UNKN,INF,IF',
'AREA:bg#DDDDDD:',
'CDEF:cool=cpu,40,LE,cpu,UNKN,IF',
'CDEF:warm=cpu,40,60,LIMIT',
'CDEF:hot=cpu,60,GE,cpu,UNKN,IF',
'AREA:cool#B0F5EC:"Cool "',
'AREA:warm#FFCC00:"Warm "',
'AREA:hot#CC3300:"Hot \\n"',
'VDEF:maxC=cpu,MAXIMUM',
'VDEF:minC=cpu,MINIMUM',
'VDEF:avgC=cpu,AVERAGE',
'GPRINT:minC:"Min %2.1lf"',
'GPRINT:maxC:"Max %2.1lf"',
'GPRINT:avgC:"Avg %2.1lf Celsius \\n"',
'LINE1:cpu#660000:',
'HRULE:60#FF0000',
==============================
Kelly
On Wed, Aug 11, 2010 at 8:43 AM, <Matt.Garrett at shell.com> wrote:
> Folks
>
>
>
> I am monitoring some Temperature props.
>
> At the moment graph looks nice with multi AREA stack but what I would
> really like is to see the graphs change color
>
> e.g. Temperature range is 0 – 100
>
> Green stack of 0 – 30
>
> Orange stack 30 – 50
>
> Dark Orange 50 -70
>
> Dark Red 70 – 100
>
>
>
> Current graphs statement looks like
>
>
>
> $def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
>
> $def[1] .= "CDEF:sp1=var1,100,/,12,* " ;
>
> $def[1] .= "CDEF:sp2=var1,100,/,30,* " ;
>
> $def[1] .= "CDEF:sp3=var1,100,/,50,* " ;
>
> $def[1] .= "CDEF:sp4=var1,100,/,70,* " ;
>
> $def[1] .= "AREA:var1#FF5C00:\"Ambient Zone\" " ;
>
> $def[1] .= "AREA:sp4#FF7C00: " ;
>
> $def[1] .= "AREA:sp3#FF9C00: " ;
>
> $def[1] .= "AREA:sp2#FFBC00: " ;
>
> $def[1] .= "AREA:sp1#FFDC00: " ;
>
> $def[1] .= "LINE1:var1#000000:\"\" " ;
>
> $def[1] .= "GPRINT:var1:LAST:\"%3.4lg %s$UNIT[1] LAST \" ";
>
> $def[1] .= "GPRINT:var1:MAX:\"%3.4lg %s$UNIT[1] MAX \" ";
>
> $def[1] .= "GPRINT:var1:AVERAGE:\"%3.4lg %s$UNIT[1] AVERAGE \" ";
>
>
>
> What I think I need are some form of IF statements to change the color over
> a certain value.
>
> Does anybody have any examples they could share.
>
>
>
> Thanks
>
>
>
> Matt
>
>
>
>
>
>
>
> Matthew Garrett
> Subsurface Remote Site Support Engineer
> Shell Information Technology International B.V.
> PO Box 60, 2280 AB Rijswijk-ZH, The Netherlands
>
> *Tel:* +31(0)70 447 4369
> *Email:* Matt.Garrett at shell.com
> *Internet:* http://www.shell.com
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>
--
K.D. Lucas
kdlucas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20100811/663cd13a/attachment.htm
More information about the rrd-users
mailing list