Xymon Mailing List Archive search

Graphing legend

3 messages in this thread

list Vernon Everett · Fri, 1 May 2009 09:37:46 +0800 ·
Hi all

I have noticed, that some graphs appear to have the colour legend at the top, and some at the side. (See attached)


I can't seem to see what in the configs defines the location of the legend.

Can anybody shed any light on this for me?

Regards
    Vernon


NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
list Ralph Mitchell · Fri, 1 May 2009 17:24:14 -0500 ·
On Thu, Apr 30, 2009 at 8:37 PM, Everett, Vernon <
quoted from Vernon Everett
user-9da1a1882f49@xymon.invalid> wrote:
 Hi all

I have noticed, that some graphs appear to have the colour legend at the
top, and some at the side. (See attached)


I can't seem to see what in the configs defines the location of the legend.

Can anybody shed any light on this for me?
I think I've run into this before...  Take a look at the definitions -
[vmstat] looks like this:

        DEF:cpu_idl=vmstat.rrd:cpu_idl:AVERAGE
        DEF:cpu_usr=vmstat.rrd:cpu_usr:AVERAGE
        DEF:cpu_sys=vmstat.rrd:cpu_sys:AVERAGE
        AREA:cpu_sys#FF0000:System
        STACK:cpu_usr#FFFF00:User
        STACK:cpu_idl#00FF00:Idle

and the [disk] entry looks like this:

        DEF:p at RRDIDX@=@RRDFN@:pct:AVERAGE
        LINE2:p at RRDIDX@#@COLOR@:@RRDPARAM@

With multiple disk partitions, that would expand to:

        DEF:p at RRDIDX@=@RRDFN@:pct:AVERAGE
        LINE2:p at RRDIDX@#@COLOR@:@RRDPARAM@
        DEF:p at RRDIDX@=@RRDFN@:pct:AVERAGE
        LINE2:p at RRDIDX@#@COLOR@:@RRDPARAM@
        DEF:p at RRDIDX@=@RRDFN@:pct:AVERAGE
        LINE2:p at RRDIDX@#@COLOR@:@RRDPARAM@

I *think* what happens is that when you have the DEF lines all stacked
together (as in vmstat), you get the color legend across the top.  When you
have the DEF lines alternating between the line/area drawing lines (as in
disk), you get the color dots at the start of each line.

I don't currently having a working xymon, so I can't try this, but you could
check that by altering the vmstat entry to alternate the DEF and area
drawing lines to see what happens.

Ralph Mitchell
list Alexander Bech · Sat, 02 May 2009 01:10:38 +0200 ·
quoted from Vernon Everett
Everett, Vernon schrieb:
Hi all
 I have noticed, that some graphs appear to have the colour legend at
the top, and some at the side. (See attached)
   I can't seem to see what in the configs defines the location of the
legend.
 Can anybody shed any light on this for me?
 Regards
    Vernon
 NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
  
Hi,
it is the order of LINE/AREA/STACK and GPRINT directives.

Here a alternative definition for vmstat graph with legend at the side:

[vmstat]
        TITLE CPU Utilization
        YAXIS % Load
        -u 100
        -r
        DEF:cpu_idl=vmstat.rrd:cpu_idl:AVERAGE
        DEF:cpu_usr=vmstat.rrd:cpu_usr:AVERAGE
        DEF:cpu_sys=vmstat.rrd:cpu_sys:AVERAGE
        AREA:cpu_sys#FF0000:System \:
        GPRINT:cpu_sys:LAST:%5.1lf (cur)
        GPRINT:cpu_sys:MAX: \: %5.1lf (max)
        GPRINT:cpu_sys:MIN: \: %5.1lf (min)
        GPRINT:cpu_sys:AVERAGE: \: %5.1lf (avg)\n
        STACK:cpu_usr#FFFF00:User   \:
        GPRINT:cpu_usr:LAST:%5.1lf (cur)
        GPRINT:cpu_usr:MAX: \: %5.1lf (max)
        GPRINT:cpu_usr:MIN: \: %5.1lf (min)
        GPRINT:cpu_usr:AVERAGE: \: %5.1lf (avg)\n
        STACK:cpu_idl#00FF00:Idle   \:
        GPRINT:cpu_idl:LAST:%5.1lf (cur)
        GPRINT:cpu_idl:MAX: \: %5.1lf (max)
        GPRINT:cpu_idl:MIN: \: %5.1lf (min)
        GPRINT:cpu_idl:AVERAGE: \: %5.1lf (avg)\n

Result:
legend

Regards
 Alex