Cacti and RRDTool font sizes
7 August 2007 – 1:39 pm by wg
Since upgrading RRDTool on our Cacti box to version 1.2, font sizes have been all messed up in our Cacti graphs. In particular, the font sizes for the legend were too big and pushing the data off the end of the line. Initially I just tried changing the font sizes in the “visual” tab of the Cacti configuration page but this made no difference. It seems that you need to specify the full path name to the font file you wish to use to generate your graphs for it to take any notice of the size variable. Using the default is fine, which in my case is located in /usr/local/share/rrdtool/fonts, but on other systems may be in /usr/share/rrdtool/fonts or elsewhere.
Here are the settings I’m using now, which seem to be working just great


























One Response to “Cacti and RRDTool font sizes”
Thanks for the tip. After upgrading my debian installation from Etch (4.0) to Lenny (5.0) (cacti version 0.8.6i-3.5 to 0.8.7b-2.1), all my fonts appeared in something like Times New Roman.
Although the paths you noted did not exist on my system, your post led me to:
$ locate -i ‘*DejaVuSansMono*’
which turned up various results, including:
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf
…
/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
After plugging in these paths, my graphs seem *mostly* back to normal, though not quite what they used to be. “Columns” in the legend don’t seem to line up correctly: http://www.p14nd4.com/images/20090217-1226-lenny-cacti-rrd.png , but I can live with this much more easily than I could live with the ugly font. Thanks!
By David R. Hedges on Feb 18, 2009