[rrd-users] Difficulty setting Graph TITLE font with RRDs::graph

Darren Murphy darren at victoriajd.com
Thu Aug 15 18:14:41 CEST 2013


Hi list,

I'm having difficulty setting a graph TITLE font size using the RRDTool
Perl bindings (RRDs::graph).

When used in a shell with `rrdtool graph`, both "-n TITLE:7:" and "--font
TITLE:7:" work as expected and give the desired result.
However, both options when passed to RRDs::graph produce an error.

"-n TITLE:7:" results in: Error: RRDs::graph failed, invalid text property
format
"--font TITLE:7:" results in: Error: RRDs::graph failed, unknown option
'--font TITLE:7:'

A Google search for both errors hasn't turned up anything useful, the
closest I got was a posting in the Cacti forums (
http://forums.cacti.net/about28174.html) that suggested upgrading RRDTool.

I am using RRDTool version 1.4.7 on CentOS 5.4

For completeness, I have included below both a dump of the array passed to
RRDs::graph which produces the failure, as well as the result of the same
arguments passed to `rrdtool graph`

Any advice much appreciated.

Thanks in advance,
Darren

@graph_args = (

'/home/mrtg/png/custom/brbraholid-usg-1_aux0-1376582178.png',
                 '-s 1375134000',
                 '-e 1375146000',
                 '-u',
                 5000000,
                 '--font TITLE:7:',
                 '-t "brbraholid-usg-1_aux0 - 2013-07-29 13:40:00 to
2013-07-29 17:00:00 BOT"',
                 '--lazy',
                 '-c',
                 'FONT#000000',
                 '-c',
                 'MGRID#000000',
                 '-c',
                 'FRAME#000000',
                 '-g',
                 '-l',
                 '0',
                 '-c',
                 'BACK#f5f5f5',
                 '-c',
                 'ARROW#000000',
                 '-b',
                 1000,
                 '-w',
                 400,
                 '-h',
                 100,

'DEF:in0=/home/mrtg/logs/brbraholid-usg-1_aux0.rrd:ds0:AVERAGE',
                 'CDEF:in=in0,8,*',

'DEF:maxin0=/home/mrtg/logs/brbraholid-usg-1_aux0.rrd:ds0:MAX',
                 'CDEF:maxin=maxin0,8,*',

'DEF:out0=/home/mrtg/logs/brbraholid-usg-1_aux0.rrd:ds1:AVERAGE',
                 'CDEF:out=out0,8,*',

'DEF:maxout0=/home/mrtg/logs/brbraholid-usg-1_aux0.rrd:ds1:MAX',
                 'CDEF:maxout=maxout0,8,*',
                 '-v',
                 'Bits per second',
                 'AREA:in#00cc00:In',
                 'LINE2:out#0000ff:Out',
                 'PRINT:out:MAX:%.1lf',
                 'PRINT:in:MAX:%.1lf',
                 'PRINT:out:AVERAGE:%.1lf',
                 'PRINT:in:AVERAGE:%.1lf',
                 'PRINT:out:LAST:%.1lf',
                 'PRINT:in:LAST:%.1lf',
                 'HRULE:5000000#cc0000'
               );



# rrdtool graph /home/mrtg/png/custom/brbraholid-usg-1_aux0-1376582307.png
"-s 1375134000" "-e 1375146000" -u 5000000 --font TITLE:7: -t
"brbraholid-usg-1_aux0 - 2013-07-29 13:40:00 to 2013-07-29 17:00:00 BOT"
--lazy -c FONT#000000 -c MGRID#000000 -c FRAME#000000 -g -l 0 -c
BACK#f5f5f5 -c ARROW#000000 -b 1000 -w 400 -h 100
DEF:in0=/home/mrtg/logs/brbraholid-usg-1_aux0.rrd:ds0:AVERAGE
CDEF:in=in0,8,*
DEF:maxin0=/home/mrtg/logs/brbraholid-usg-1_aux0.rrd:ds0:MAX
CDEF:maxin=maxin0,8,*
DEF:out0=/home/mrtg/logs/brbraholid-usg-1_aux0.rrd:ds1:AVERAGE
CDEF:out=out0,8,*
DEF:maxout0=/home/mrtg/logs/brbraholid-usg-1_aux0.rrd:ds1:MAX
CDEF:maxout=maxout0,8,* -v "Bits per second" AREA:in#00cc00:In
LINE2:out#0000ff:Out PRINT:out:MAX:%.1lf PRINT:in:MAX:%.1lf
PRINT:out:AVERAGE:%.1lf PRINT:in:AVERAGE:%.1lf PRINT:out:LAST:%.1lf
PRINT:in:LAST:%.1lf HRULE:5000000#cc0000
497x152
1509394.8
4679144.1
870588.4
3460818.0
630603.4
3686902.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130816/44973903/attachment.htm 


More information about the rrd-users mailing list