[rrd-users] Need some Assistance Creating a Graph

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Thu Dec 11 10:00:43 CET 2008


----- Original Message ----- 
From: "Mackell, Thomas O" <tomackell at duke-energy.com>
To: <rrd-users at lists.oetiker.ch>
Sent: Tuesday, December 09, 2008 8:17 PM
Subject: [rrd-users] Need some Assistance Creating a Graph


>I would like to create a chart from data I have been collecting on the 
>local temperature.
> I have created some bar and line charts after playing with the graph part 
> of rrdtool.
>
> Now I saw the chart I would like in the gallery, it's the one labeled 
> "Temperature". It shows the temperature of a computer room. The demo link 
> no longer works.
>
> So does anyone have the cdef's that change the chart color by the value of 
> the data?

No, but I can try to help you recreate it. The code below is NOT tested at 
all. It is just a general idea on how to approach this.

It seems to be a simple algoritm:

Some 6 different colours, equally divided over the entire range.

Try something like this:

--lower-limit 0
DEF:Tin=....
DEF:Tout=....
CDEF:t1=Tin,6,/
AREA:t#FF0000:Temperature\ computer\ room
AREA:t1#B0D8D8
AREA:t1#00CC00::STACK
AREA:t1#80FF80::STACK
AREA:t1#F0FF00::STACK
AREA:t1#FF8000::STACK
LINE2:Tout#000000:Temperature\ outside

It works like so:
Display the entire range in red.
Overlay 5/6 of this with different colours, starting from the X-axis and 
then stacked on top of each other.
Each band is 1/6 which is 16%

I guessed the colours, you may need to adjust those.^

You may want to use different percentages:

--lower-limit 0
DEF:t=....
CDEF:t1=t,10,/
CDEF:t2=t,20,/
AREA:t#FF0000:temperature
AREA:t1#B0D8D8
AREA:t2#00CC00::STACK
AREA:t2#80FF80::STACK
AREA:t2#F0FF00::STACK
AREA:t2#FF8000::STACK

this shows 10%+20%+20%+20%+20%+10% 



More information about the rrd-users mailing list