[rrd-users] Graphing multiple databases into one graphs

Jim Avery jim at jimavery.me.uk
Thu Mar 29 18:11:38 CEST 2012


On 29 March 2012 15:28, ilConsigliere <ilconsigliere at email.it> wrote:
> Hi,
> I'm trying to insert sereveral rrd databas einto one graph.
> I'm using a per script made by an ex-collegue and it works fine but I cannot
> display the stack of the values.
> I use this kind of creation:
>
> [memory]
>        FNPATTERN memory_(.*)_(.*).rrd
>        GROUPBY @RRDPARAM_2@
>        TITLE Memory Utilization of @RRDPARAM_2@
>        YAXIS Used
>        -w 680
>        -l 0
>        -Y
>        COMMENT:"Graph period @DATERANGE@\n"
>        DEF:p at RRDIDX@=@RRDFN@:used:AVERAGE
>        LINE2:p at RRDIDX@#@COLOR@:"@RRDPARAM_1@ used \t"
>        GPRINT:p at RRDIDX@:LAST:" \: %4.2lf%s (cur)"
>        GPRINT:p at RRDIDX@:MAX:" \: %4.2lf%s (max)"
>        GPRINT:p at RRDIDX@:MIN:" \: %4.2lf%s (min)"
>        GPRINT:p at RRDIDX@:AVERAGE:" \: %4.2lf%s (avg)\n"
>
> I'd like to display also the stack but I cannot do it. I tried several way
> but I faild. How can I do that?

If it's any help, a graph I have here uses the following syntax

 DEF:a=/usr/local/pnp4nagios/var/perfdata/aserver/DataStore_Test.rrd:1:AVERAGE \
 DEF:d=/usr/local/pnp4nagios/var/perfdata/aserver/DataStore_Production_01_S.rrd:1:AVERAGE
\
 DEF:b=/usr/local/pnp4nagios/var/perfdata/aserver/DataStore_Production_01_F.rrd:1:AVERAGE
\
 AREA:a#008080:France_EDI       \
 VDEF:a_MIN=a,MINIMUM \
 GPRINT:a_MIN:Min\: %8.2lf%s \
 VDEF:a_MAX=a,MAXIMUM \
 GPRINT:a_MAX:Max\: %8.2lf%s \
 VDEF:a_LAST=a,LAST \
 GPRINT:a_LAST:Last\: %8.2lf%s\n \
 AREA:d#00FFFF:Production_01_S :STACK \
 VDEF:d_MIN=d,MINIMUM \
 GPRINT:d_MIN:Min\: %8.2lf%s \
 VDEF:d_MAX=d,MAXIMUM \
 GPRINT:d_MAX:Max\: %8.2lf%s \
 VDEF:d_LAST=d,LAST \
 GPRINT:d_LAST:Last\: %8.2lf%s\n \
 AREA:b#0000FF:Production_01_F :STACK \
 VDEF:b_MIN=b,MINIMUM \
 GPRINT:b_MIN:Min\: %8.2lf%s \
 VDEF:b_MAX=b,MAXIMUM \
 GPRINT:b_MAX:Max\: %8.2lf%s \
 VDEF:b_LAST=b,LAST \
 GPRINT:b_LAST:Last\: %8.2lf%s\n \

Obviously I'm using AREA here rather than LINE2, as I think it looks
better when using STACK.

I can highly recommend using drraw for this sort of thing - even if
what you want to do is more complicated than what drraw can do, you
can use drraw to show you what most of the syntax you need is and then
look up the documentation for the rest.

http://web.taranis.org/drraw/

hth,

Jim



More information about the rrd-users mailing list