Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

MRTG defaults to titling each traffic graph as "Traffic Analysis for ${port_int}" I would like to instead have each graph titled by the description of the switchport. How could I do this?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

This is absolutely possible. The text on and around the graphs is fully themeable. The documentation shows this pretty well. For example, to change the "Traffic Analysis for xyz" text use the key:

Title[GigE2/1]: Description of switch port GigE2/1

If you're generating your MRTG graphs by way of cfgmaker

cfgmaker --ifdesc=descr $OtherOptions

Should render you the same thing automatically. Your titles won't be Traffic analysis for 2/1 they will be Traffic analysis for Payments Server, which sounds like what you're looking for. If you need something more then that, then you need to start looking into the "--if-template" function of cfgmaker. It allows a much more detailed customization of the text fields, but does require some scripting.

share|improve this answer
    
could you link the doc? I ran cfgmaker with the --ifdesc=desc option and it threw an error stating that 'desc' was no a valid value for ifdesc –  MattUebel Aug 26 '10 at 21:04
    
oss.oetiker.ch/mrtg/doc/index.en.html is the doc-home, with cfgmaker at oss.oetiker.ch/mrtg/doc/cfgmaker.en.html and it should be descr not desc. Oops. –  sysadmin1138 Aug 26 '10 at 21:24

In your .cfg file for the device, look for the Title[]: definitions and modify those to your heart's delight. See http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html#Title_CONTENT.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.