Xymon Mailing List Archive search

Multiple RRD graphs and text instance

3 messages in this thread

list Joel Carnat · Mon, 6 Aug 2012 10:45:39 +0200 ·
Hi,

When creating custom graph from multiple RRD, every GPRINT and COMMENT are repeated for each FNPATTERN.
Is there a way to have text only written once.
Something like:
	(...)
	COMMENT:@RRDPARAM@ title
	GPRINT:val at RRDIDX@:LAST:%4.0lf
	GPRINT:val at RRDIDX@:MIN:%4.0lf
	GPRINT:val at RRDIDX@:MAX:%4.0lf
	GPRINT:val at RRDIDX@:AVERAGE:%4.0lf\l
	COMMENT:Last comment written only once
That will graph:
	param0 title 0 0 0 0
	param1 title 0 0 0 0
	param2 title 0 0 0 0
	Last comment written only once

TIA,
	Jo
list Henrik Størner · Mon, 06 Aug 2012 11:24:24 +0200 ·
quoted from Joel Carnat
On 06-08-2012 10:45, Joel Carnat wrote:
When creating custom graph from multiple RRD, every GPRINT and COMMENT are repeated for each FNPATTERN.
Is there a way to have text only written once.
It should only print once, but it depends on where you put it in the graph-definition.
quoted from Joel Carnat
Something like:
	(...)
	COMMENT:@RRDPARAM@ title
	GPRINT:val at RRDIDX@:LAST:%4.0lf
	GPRINT:val at RRDIDX@:MIN:%4.0lf
	GPRINT:val at RRDIDX@:MAX:%4.0lf
	GPRINT:val at RRDIDX@:AVERAGE:%4.0lf\l
	COMMENT:Last comment written only once
Should be OK, if you write it *after* all of the DEF/CDEF/LINE/AREA definitions.

At least, that is how I think it works. Please post the full graphs.cfg definition.


Regards,
Henrik
list Joel Carnat · Mon, 6 Aug 2012 11:58:10 +0200 ·
quoted from Henrik Størner
Le 6 août 2012 à 11:24, Henrik Størner a écrit :
On 06-08-2012 10:45, Joel Carnat wrote:
When creating custom graph from multiple RRD, every GPRINT and COMMENT are repeated for each FNPATTERN.
Is there a way to have text only written once.
It should only print once, but it depends on where you put it in the graph-definition.
Something like:
	(...)
	COMMENT:@RRDPARAM@ title
	GPRINT:val at RRDIDX@:LAST:%4.0lf
	GPRINT:val at RRDIDX@:MIN:%4.0lf
	GPRINT:val at RRDIDX@:MAX:%4.0lf
	GPRINT:val at RRDIDX@:AVERAGE:%4.0lf\l
	COMMENT:Last comment written only once
Should be OK, if you write it *after* all of the DEF/CDEF/LINE/AREA definitions.

At least, that is how I think it works. Please post the full graphs.cfg definition.
[vsphere_datastore]
        FNPATTERN ^vsphere_datastore.(.+).rrd
        TITLE Datastore Activity
        YAXIS Latency (ms)
        -b 1000
        -l 0
        -E
        COMMENT:                       
        COMMENT:   Cur\:
        COMMENT:   Min\:
        COMMENT:   Avg\:
        COMMENT:   Max\:\j
        DEF:rlat at RRDIDX@=@RRDFN@:rlat:AVERAGE
        DEF:wlat at RRDIDX@=@RRDFN@:wlat:AVERAGE
        CDEF:crlat at RRDIDX@=rlat at RRDIDX@,-1,*
        AREA:crlat at RRDIDX@#@COLOR@:@RRDPARAM@ read latency 
        GPRINT:rlat at RRDIDX@:LAST:%6.2lf
        GPRINT:rlat at RRDIDX@:MIN:%6.2lf
        GPRINT:rlat at RRDIDX@:AVERAGE:%6.2lf
        GPRINT:rlat at RRDIDX@:MAX:%6.2lf\j
        AREA:wlat at RRDIDX@#@COLOR@:@RRDPARAM@ write latency
        GPRINT:wlat at RRDIDX@:LAST:%6.2lf
        GPRINT:wlat at RRDIDX@:MIN:%6.2lf
        GPRINT:wlat at RRDIDX@:AVERAGE:%6.2lf
        GPRINT:wlat at RRDIDX@:MAX:%6.2lf\j
        COMMENT: \j

What I would like is the "Cur/min/Avg/Max" line to appear only once at the beginning and the "new line" t appear only once at the end. Moving "COMMENT" section doesn't seem to do anything. Xymon is 4.3.9, compiled from sources on OpenBSD.

The graph is attached.
Regards,
Henrik

Attachments (1)