Hi RRD gurus,
In an earlier email to the users group a couple days ago I was asking about
CDEF and VDEF variables. Is it possible to take one of these values and use it
in the graph's title or GPRINT label?
For example, I use VDEF to create a variable dtfoo:
VDEF:dtfoo=dt,MAXIMUM
Is it possible to substitute this value into the graphs title label thus:
rrdtool graph /path/to/outputimage/rrd.png \
--interlaced --imgformat PNG --end 1289434618 --start 1286756217 \
--width 600 --height 200 \
DEF:dt=/path/to/dt.rrd:dt:AVERAGE \
VDEF:dtfoo=dt,MAXIMUM \
CDEF:dtmaxdiff=dt,POP,dtfoo,16,- \
LINE1:dtmaxdiff#990000:'TESTFOO' \
GPRINT:dt:LAST:'Latest value for TESTFOO\: %4.0lf%s\j' \
--title 'Max value for graph is: dtfoo'
Obviously my pseudocode will fail and just output the string 'dtfoo', but can I
substitute it in somehow? My users need to know the max value that is being
used to calibrate all the other values in the graph.
Alternatively can I concatenate the GPRINT variable substitution? Something
like (here I have used a comma as the variable splitter):
GPRINT:dt,dtfoo:LAST:'Latest value for TESTFOO\: %4.0lf%s from a maximum of
%4.0lf%s\j'
A simple 'yes, here is the documentation' or 'nope, you are crazy' answer is
fine.
Thanks in advance and have a great weekend all!
- Rob Newman
_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users