[rrd-users] How to change graph colour as Temperature increases
Pablo Sanchez
pablo at blueoakdb.com
Wed Aug 11 17:49:34 CEST 2010
[ Comments below, in line ]
On Wednesday 11 August 2010 at 11:43 am, Matt.Garrett at shell.com penned
about "[rrd-users] How to change graph colour as Temperature increases"
> 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
Hi Matt,
I do something similar with wind direction. Depending on the
direction, I use a different color.
Below is a snippet of my graph definition - see the CDEF's for `N',
`NE', etc.
---8-<---8-<---8-<---8-<---8-<---8-<-
DEF:wind_speed=$WIND_SPEED_FILE:wind_speed:AVERAGE \
DEF:gust_speed=$GUST_SPEED_FILE:gust_speed:MAX \
CDEF:conv_wind_speed="wind_speed${KTS2TARGET_FORMULA}" \
CDEF:conv_gust_speed="gust_speed${KTS2TARGET_FORMULA}" \
DEF:wind_direction=$WIND_DIRECTION_FILE:wind_direction:AVERAGE \
CDEF:N='wind_direction,315,GT,wind_direction,22.5,LE,+,conv_wind_speed,UNKN,IF' \
CDEF:NE='wind_direction,22.5,GT,wind_direction,67.5,LE,*,conv_wind_speed,UNKN,IF' \
CDEF:E='wind_direction,67.5,GT,wind_direction,112.5,LE,*,conv_wind_speed,UNKN,IF' \
CDEF:SE='wind_direction,112.5,GT,wind_direction,157.5,LE,*,conv_wind_speed,UNKN,IF' \
CDEF:S='wind_direction,157.5,GT,wind_direction,202.5,LE,*,conv_wind_speed,UNKN,IF' \
CDEF:SW='wind_direction,202.5,GT,wind_direction,247.5,LE,*,conv_wind_speed,UNKN,IF' \
CDEF:W='wind_direction,247.5,GT,wind_direction,292.5,LE,*,conv_wind_speed,UNKN,IF' \
CDEF:NW='wind_direction,292.5,GT,wind_direction,337.5,LE,*,conv_wind_speed,UNKN,IF' \
VDEF:last_conv_wind_speed=conv_wind_speed,LAST \
VDEF:max_conv_wind_speed=conv_wind_speed,MAXIMUM \
VDEF:last_conv_gust_speed=conv_gust_speed,LAST \
VDEF:max_conv_gust_speed=conv_gust_speed,MAXIMUM \
AREA:conv_gust_speed#$WIND_GUST_AREA_COLOR:"$WIND_GUST" \
COMMENT:'\j' \
LINE1:conv_gust_speed#$WIND_GUST_LINE_COLOR \
AREA:N#$NORTH_AREA_COLOR:"$NORTH" \
AREA:NW#$NORTH_WEST_AREA_COLOR:"$NORTH_WEST" \
AREA:W#$WEST_AREA_COLOR:"$WEST" \
AREA:SW#$SOUTH_WEST_AREA_COLOR:"$SOUTH_WEST" \
AREA:S#$SOUTH_AREA_COLOR:"$SOUTH" \
AREA:SE#$SOUTH_EAST_AREA_COLOR:"$SOUTH_EAST" \
AREA:E#$EAST_AREA_COLOR:"$EAST" \
AREA:NE#$NORTH_EAST_AREA_COLOR:"$NORTH_EAST" \
COMMENT:'\j' \
COMMENT:'\s' \
LINE1:conv_wind_speed#$WIND_SPEED_LINE_COLOR \
GPRINT:max_conv_gust_speed:"${WIND_GUST}${WIND_GUST_MAX_SHIM}$MAX"' %'$FORMAT \
GPRINT:max_conv_gust_speed:"$TIMESTAMP"':strftime' \
GPRINT:last_conv_gust_speed:"${WIND_GUST_LAST_SHIM}$LAST"' %'$FORMAT \
COMMENT:'\l' \
GPRINT:max_conv_wind_speed:"${WIND_SPEED}${WIND_SPEED_MAX_SHIM}$MAX"' %'$FORMAT \
GPRINT:max_conv_wind_speed:"$TIMESTAMP"':strftime' \
GPRINT:last_conv_wind_speed:"${WIND_SPEED_LAST_SHIM}$LAST"' %'$FORMAT'\l' \
--
Pablo Sanchez - Blueoak Database Engineering, Inc
Ph: 819.459.1926 Fax: 760.860.5225 (US)
More information about the rrd-users
mailing list