[rrd-users] Re: rrdgraph vs smokeping.cgi

Curby curby.public at gmail.com
Fri Mar 17 12:38:21 MET 2006


On 3/17/06, Bohdan Linda <bohdan.linda at seznam.cz> wrote:
> I would like to use with other stuff. Smokeping seems to have its own
> rendering engine, which is separate from rrdgraph tool. So before I

"SmokePing uses RRDtool to ... draw pretty graphs" from the smokeping homepage.

> I would like to ask, if it is possible with the lastest
> rrdgraph to do the following:
>
> - Change linecolor accroding variable value
> - Change background color according variable value

Yes, it's even possible in the older 1.0 versions.

The tutorial at

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/tut/rrdtutorial.en.html

has several examples of doing this.  I also use it here:

https://www.curby.net/stats/reach.html

with the following *DEFs and graphing commands:

    DEF:raw=$DATADIR/reach.rrd:reach:AVERAGE \
    CDEF:inv=100,raw,100,*,- \
    CDEF:toogood=inv,0.001,LT,100,UNKN,IF \
    CDEF:four=inv,0.01,LT,0.01,UNKN,IF \
    CDEF:three=inv,0.1,LT,0.1,UNKN,IF \
    CDEF:two=inv,1,LT,1,UNKN,IF \
    CDEF:one=inv,10,LT,10,UNKN,IF \
    CDEF:zero=inv,100,LT,100,UNKN,IF \
    CDEF:tfour=inv,0.01,LT,99.99,UNKN,IF \
    CDEF:tthree=inv,0.1,LT,99.9,UNKN,IF \
    CDEF:ttwo=inv,1,LT,99,UNKN,IF \
    CDEF:tone=inv,10,LT,90,UNKN,IF \
    AREA:zero#FFAAAA \
    AREA:one#FFCC99:"<10%" \
    STACK:tone#FFFFFF \
    AREA:two#FFFFCC:"<1%" \
    STACK:ttwo#FFFFFF \
    AREA:three#CCFFCC:"<.1%" \
    STACK:tthree#FFFFFF \
    AREA:four#BBFFFF:"<.01%" \
    STACK:tfour#FFFFFF \
    AREA:toogood#CCDDFF:"<.001%" \
    LINE1:inv#0000FF:"Trend" \
    AREA:toogood#CCDDFF \

... though something tells me it could be simplified and still produce
the same graph.

Good luck with your tinkering! =)

--Curby

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list