<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi RRD gurus,<div><br></div><div>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?</div><div><br></div><div>For example, I use VDEF to create a variable dtfoo:</div><div><br></div><div><div><font class="Apple-style-span" face="Courier">VDEF:dtfoo=dt,MAXIMUM</font></div></div><div><br></div><div>Is it possible to substitute this value into the graphs title label thus:</div><div><br></div><div><div><font class="Apple-style-span" face="Courier">rrdtool graph /path/to/outputimage/rrd.png \</font></div><div><font class="Apple-style-span" face="Courier"> --interlaced --imgformat PNG --end 1289434618 --start 1286756217 \</font></div><div><font class="Apple-style-span" face="Courier"> --width 600 --height 200 \</font></div><div><font class="Apple-style-span" face="Courier"> DEF:dt=/path/to/dt.rrd:dt:AVERAGE \</font></div><div><font class="Apple-style-span" face="Courier"> VDEF:dtfoo=dt,MAXIMUM \</font></div><div><font class="Apple-style-span" face="Courier"> CDEF:dtmaxdiff=dt,POP,dtfoo,16,- \</font></div><div><font class="Apple-style-span" face="Courier"> LINE1:dtmaxdiff#990000:'TESTFOO' \</font></div><div><font class="Apple-style-span" face="Courier"> GPRINT:dt:LAST:'Latest value for TESTFOO\: %4.0lf%s\j' \</font></div><div><font class="Apple-style-span" face="Courier"> </font><span class="Apple-style-span" style="font-family: Courier; ">--title 'Max value for graph is: dtfoo</span><span class="Apple-style-span" style="font-family: Courier; ">'</span></div></div><div><span class="Apple-style-span" style="font-family: Courier; "><br></span></div><div>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.</div><div><br></div><div>Alternatively can I concatenate the GPRINT variable substitution? Something like (here I have used a comma as the variable splitter):</div><div><span class="Apple-style-span" style="font-family: Courier; "><br></span></div><div><span class="Apple-style-span" style="font-family: Courier; "> GPRINT:dt,dtfoo:LAST:'Latest value for TESTFOO\: %4.0lf%s from a maximum of </span><span class="Apple-style-span" style="font-family: Courier; ">%4.0lf%s\j</span><span class="Apple-style-span" style="font-family: Courier; ">'</span></div><div><span class="Apple-style-span" style="font-family: Courier; "><br></span></div><div>A simple 'yes, here is the documentation' or 'nope, you are crazy' answer is fine.</div><div><br></div><div>Thanks in advance and have a great weekend all!</div><div>- Rob Newman</div></body></html>