[mrtg] Script returns 4 values, Plot values via MRTG/routers2?

Steve Shipway s.shipway at auckland.ac.nz
Thu Jan 3 03:14:58 CET 2013

Matt has it right (and saves me having to make the answer myself!)


A few enhancements I could suggest ¨C

1.       In the example below, routers.cgi*Description[] and
routers.cgi*Title[] are synonyms.  Only use one of them ¨C the other will be
ignored.  This defines the title that appears on the top of the graph ¨C
routers.cgi*ShortDesc[] defines the label used in the side menu.  

2.       In the example below, do not use
routers.cgi*GraphStyle[All-Counters]:range because this will use ¡®range¡¯
graph display mode and this is definitely not range data (this style creates
floating bars).

3.       You might like to make a single plugin script that takes a
parameter to say which value to output.  Easier to maintain.  This was
mentioned by Matt below.

4.       You *could* use only two Target[]s, with each one holding two
separate metrics, one in the ¡®in¡¯ and one in the ¡®out¡¯.  The
routers.cgi*Graph[] directive will still display both of them (of course, in
this case, omit the ¡®noo¡¯ option)

5.       Use routers.cgi*InMenu[]:no to suppress the component Target[]s
from the side menu and only see the userdefined summary graph.  You can also
use routers.cgi*InSummary[All-Counters]:yes to make the userdefined graph
appear on the summary page (by default it may not be).

6.       If it matters to you which count is which, you can put more detail
in the Legend1[] defininitions.  You can also use LegendI[] to make them

7.       If the total of the 4 counters is important, then you can stack
them using routers.cgi*GraphStyle[All-Counters]:stack ; you can also add
¡®total¡¯ to the end of at least one of the routers.cgi*Graph[] lines to get
a calculated total of the components in addition to the average.

8.       I¡¯ll put a plug for the MRTG/RRD/Routers2 book in here http://www.
steveshipway.org/book that you might be able to get your employer to shell
out for.  It contains all sorts of neat tricks you can do with the extended





Steve Shipway

ITS Unix Services Design Lead

University of Auckland, New Zealand

Floor 1, 58 Symonds Street, Auckland

Phone: +64 (0)9 3737599 ext 86487

DDI: +64 (0)9 924 6487

Mobile: +64 (0)21 753 189

Email:  <mailto:s.shipway at auckland.ac.nz> s.shipway at auckland.ac.nz

P Please consider the environment before printing this e-mail : ´òÓ¡±¾Óʼþ£¬


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20130103/b02c03ac/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5900 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20130103/b02c03ac/attachment-0001.bin 

More information about the mrtg mailing list