[rrd-users] Graph Backgrounds (RE Example on rrdtool Site)

Mark.Rippe at cox.com Mark.Rippe at cox.com
Mon Dec 8 15:24:48 CET 2008


Awhile back, someone added an interesting function to the graphs.
It was possible to mouse-over a data point, 
right click and a box would open showing information
On that data point such as 
Time, data point value (level,percent, etc)
I have searched but found nothing.
Does anyone know if this still exists in some obscure 
Database, server, etc ???
If so, can I get either a copy of the script 
or can someone please point in the right direction?

Thanks,

mark.rippe at cox.com
"When the wagons are circled, remember to shoot outward."
- John Womersley, British Technology Council


-----Original Message-----
From: rrd-users-bounces at lists.oetiker.ch
[mailto:rrd-users-bounces at lists.oetiker.ch] On Behalf Of Karl Fischer
Sent: Saturday, December 06, 2008 12:43 PM
To: William R. Lorenz
Cc: rrd-users
Subject: Re: [rrd-users] Graph Backgrounds (RE Example on rrdtool Site)

William R. Lorenz wrote:
> Hi All,
> 
> I'm looking to create a graph similar to --
> 
>    http://oss.oetiker.ch/rrdtool/gallery/panel_user.png
> 
> with red/green coloring depending on when something is online or
offline. 
> Can someone help provide a high-level overview as to which rrdtool
graph 
> commands/options I should be looking at to accomplish the red/green
shade?
> 
> Just a pointer in the right direction so I can RTM would help a lot.

Wiliam,

to graph to the top(bottom) edge of the canvas you need a value of
+(-)inf.

ex.

DEF:temp=some.rrd:temp:AVERAGE
DEF:onoff=some.rrd:onoff:LAST
CDEF:back=onoff,INF,*         # if onoff != 0 this will be INF,
otherwise 0
AREA:back#ff000020            # add 4th color value for transparency
LINE1:temp#0000ff

If you want red(off)/green(on), this will look like:

DEF:temp=some.rrd:temp:AVERAGE
DEF:onoff=some.rrd:onoff:LAST
CDEF:red=onoff,0,EQ,INF,0,IF  # if onoff == 0 this will be INF,
otherwise 0
CDEF:green=onoff,INF,*        # if onoff != 0 this will be INF,
otherwise 0
AREA:red#ff000020             # add 4th color value for transparency
AREA:green#00ff0020           # add 4th color value for transparency
LINE1:temp#0000ff

Of course you can make this depending of some value, eq:

CDEF:red=temp,50,LT,0,INF,IF
CDEF:green=temp,50,LT,INF,0,IF

haven't tested it, but unless there's a typo it should work.

hth

- Karl

_______________________________________________
rrd-users mailing list
rrd-users at lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users



More information about the rrd-users mailing list