


mrtg                                                 REFERENCE(1)



NNNNAAAAMMMMEEEE
     reference - MRTG 2.9.10 configuration reference

OOOOVVVVEEEERRRRVVVVIIIIEEEEWWWW
     The runtime behaviour of MRTG is governed by a configuration
     file. Run of the mill configuration files can be generated
     with ccccffffggggmmmmaaaakkkkeeeerrrr. (Check the cfgmaker manpage). But for more
     elaborate configurations some hand tuning is required.

     This document describes all the configuration options
     understud by the mrtg software.

SSSSYYYYNNNNTTTTAAAAXXXX
     MRTG configuration file syntax follows some simple rules:

     +o   Keywords must start at the beginning of a line.

     +o   Lines which follow a keyword line which do start with a
         blank are appended to the keyword line

     +o   Empty Lines are ignored

     +o   Lines starting with a # sign are comments.

     +o   You can add other files into the configuration file
         using

         IIIInnnncccclllluuuuddddeeee:::: _f_i_l_e

         Example:

          Include: base-options.inc


GGGGLLLLOOOOBBBBAAAALLLL PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
     WWWWoooorrrrkkkkDDDDiiiirrrr

     WorkDir specifies where the logfiles and the webpages should
     be created.

     Example:

      WorkDir: /usr/tardis/pub/www/stats/mrtg


OOOOPPPPTTTTIIIIOOOONNNNAAAALLLL GGGGLLLLOOOOBBBBAAAALLLL PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
     HHHHttttmmmmllllDDDDiiiirrrr

     HtmlDir specifies the directory where the html (or shtml,
     but we'll get on to those later,) lives.





2001-02-20             Last change: 2.9.10                      1






mrtg                                                 REFERENCE(1)



     NOTE: Workdir overides the settings for htmldir, imagedir
           and logdir

     Example:

      Htmldir: /www/mrtg/


     IIIImmmmaaaaggggeeeeDDDDiiiirrrr

     ImageDir specifies the directory where the images live, they
     should be under the html directory.

     Example:

      Imagedir: /www/mrtg/images


     LLLLooooggggDDDDiiiirrrr

     LogDir specifies the directory where the logs are stored.
     This need not be under htmldir directive.

     Example:

      Logdir: /www/mrtg/logs


     FFFFoooorrrrkkkkssss ((((UUUUNNNNIIIIXXXX oooonnnnllllyyyy))))

     An a system that can fork (UNIX for example) mrtg can fork
     itself into multiple instances while it is acquiring data
     via snmp.

     For situations with high latency or a great number of
     devices this will speed things up considerably. It will not
     make things faster though if you query a single switch
     sitting next door.

     As far as I know NT can not fork so this option is not
     available on NT.

     Example:

      Forks: 4


     RRRReeeeffffrrrreeeesssshhhh

     How many seconds apart should the browser (Netscape) be
     instructed to reload the page? If this is not defined, the
     default is 300 seconds (5 minutes).



2001-02-20             Last change: 2.9.10                      2






mrtg                                                 REFERENCE(1)



     Example:

      Refresh: 600


     IIIInnnntttteeeerrrrvvvvaaaallll

     How often do you call mrtg? The default is 5 minutes. If you
     call it less often, you should specify it here. This does
     two things:

     +o   the generated HTML page does contain the right
         information about the calling interval ...

     +o   a META header in the generated HTML page will instruct
         caches about the time to live of this page .....

     In this example we tell mrtg that we will be calling it
     every 10 minutes. If you are calling mrtg every 5 minutes,
     you can leave this line commented out.

     Example:

      Interval: 10


     WWWWrrrriiiitttteeeeEEEExxxxppppiiiirrrreeeessss

     With this switch mrtg will generate .meta files for CERN and
     Apache servers which contain Expiration tags for the html
     and gif files. The *.meta files will be created in the same
     directory as the other files, so you will have to set
     "MetaDir ." and "MetaFiles on" in your apache.conf or
     .htaccess file for this to work

     NOTE: If you are running Apache-1.2 or later, you can use
     the mod_expire to achieve the same effect ... see the file
     htaccess.txt

     Example:

      WriteExpires: Yes


     NNNNooooMMMMiiiibbbb2222

     Normally we ask the SNMP device for 'sysUptime', 'sysName'
     properties some do not have these. If you want to avoid
     getting complaints from mrtg about these missing properties,
     specivy the nomib2 option.





2001-02-20             Last change: 2.9.10                      3






mrtg                                                 REFERENCE(1)



     An example of agents which do not implement base mib2
     attributes are Computer Associates - Unicenter TNG Agents.
     CA relies on using the base OS SNMP agent in addition to its
     own agents to supplement the management of a system.

     Example:

      NoMib2: Yes


     SSSSiiiinnnngggglllleeeeRRRReeeeqqqquuuueeeesssstttt

     Some SNMP implementations can not deal with requests asking
     for multiple snmp variables in one go. Set this in your cfg
     file to force mrtg to only ask for one variable per request.

     Examples

      SingleRequest: Yes


     IIIIccccoooonnnnDDDDiiiirrrr

     If you want to keep the mrtg icons in some place other than
     the working (or imagedir) directory, use the _I_c_o_n_D_i_r
     variable for defining the url to the icons directory.

     Example:

      IconDir: /mrtgicons/


     LLLLooooaaaaddddMMMMIIIIBBBBssss

     Load the MIB _f_i_l_e(s) specified and make its OIDs available
     as symbolic names. For better efficiancy, a cache of MIBs is
     maintained in the WorkDir.

     Example:

      LoadMIBs: /dept/net/mibs/netapp.mib,/usr/local/lib/ft100m.mib


     LLLLaaaannnngggguuuuaaaaggggeeee

     Switch output format to the selected Language (Check the
     _t_r_a_n_s_l_a_t_e directory to see which languages are supported at
     the moment. In this directory you can also find instructions
     on how to create new translations).

     Example:




2001-02-20             Last change: 2.9.10                      4






mrtg                                                 REFERENCE(1)



      Language: danish


     LLLLooooggggFFFFoooorrrrmmmmaaaatttt

     Setting LogFormat to 'rrdtool' in your mrtg.cfg file enables
     rrdtool mode.  In rrdtool mode, mrtg relies on rrrrrrrrddddttttoooooooollll to do
     its logging. Graphs and html pages will be generated on the
     fly by the 14all.cgi which can be found in the contrib
     section together with a short readme ... This feature has
     been contributed by Rainer.Bawidamann@informatik.uni-ulm.de.
     Please check his website for more information:
     http://www.uni-ulm.de/~rbawidam/mrtg-rrd/

     Example:

      LogFormat: rrdtool


     LLLLiiiibbbbAAAAdddddddd

     If you are using rrdtool mode and your rrrrrrrrddddttttoooooooollll Perl module
     (RRDs.pm) is not installed in a location where perl can find
     it on its own, you can use LibAdd to supply an appropriate
     path.

     Example:

      LibAdd: /usr/local/rrdtool/lib/perl/


     PPPPaaaatttthhhhAAAAdddddddd

     If the rrrrrrrrddddttttoooooooollll executable can not be found in the normal
     `PATH', you can use this parameter to add a suitable
     directory to your path.

     Example:

      PathAdd: /usr/local/rrdtool/bin/


     RRRRuuuunnnnAAAAssssDDDDaaaaeeeemmmmoooonnnn

     The RunAsDaemon keyword enables daemon mode operation. The
     purpose of daemon mode is that MRTG is launched once and not
     at regular basis by cron as in native mode. This behavior
     saves computing resourses as loading and parsing of
     configuration files only hapens once.

     Using daemon mode MRTG itself is responible for timing the
     measurement intervals. Therfore its important to set the



2001-02-20             Last change: 2.9.10                      5






mrtg                                                 REFERENCE(1)



     Interval keyword to an apropiate value.

     Note that using daemon mode MRTG should no longer be started
     from cron by regular basis as each started process runs
     forever. Instead MRTG should be started from the command
     prompt or by a system startup script.

     If you want mrtg to run under a particular user and group
     (it is not recomented to run MRTG as root) then you can use
     the --------uuuusssseeeerrrr====_u_s_e_r___n_a_m_e and --------ggggrrrroooouuuupppp====_g_r_o_u_p___n_a_m_e options on the
     mrtg commandline.

      mrtg --user=mrtg_user --group=mrtg_group mrtg.cfg

     Also note that in daemon mode restart of the process is
     required in order to activate changes in the config file.

     Under UNIX, the Daemon switch causes mrtg to fork into
     background after checking its config file. On Windows NT the
     MRTG process will detach from the console, but because the
     NT/2000 shell waits for its children you have to use the
     special start sequence when you launch the program:

      start /b perl mrtg mrtg.cfg

     You may have to add path information equal to what you add
     when you run mrtg from the commandline.

     Example

      RunAsDaemon:Yes
      Interval:5

     Makes MRTG run as a daemon beginning data collection every 5
     minutes

PPPPEEEERRRR TTTTAAAARRRRGGGGEEEETTTT CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNN
     Each monitoring target must be identified by a unique name.
     This name must be appended to each parameter belonging to
     the same target. The name will also be used for naming the
     generated webpages, logfiles and images for this target.

     TTTTaaaarrrrggggeeeetttt

     With the _T_a_r_g_e_t keyword you tell mrtg what it should
     monitor. The _T_a_r_g_e_t keyword takes arguments in a wide range
     of formats:

     Basic
         The most basic format is "port:community@router" This
         will generate a traffic graph for the interface 'port'
         of the host 'router' (dns name or IP address) and it



2001-02-20             Last change: 2.9.10                      6






mrtg                                                 REFERENCE(1)



         will use the community 'community' (snmp password) for
         the snmp query.

         Example:

          Target[ezwf]: 2:public@wellfleet-fddi.ethz.ch

         If your community contains a "@" or a " " these
         characters mus be escaped with a "\".

          Target[bla]: 2:stu\ pi\@d@router


     SNMPv2c
         If you have a fast router you might want to try to poll
         the ifHC* counters.  This feature gets activated by
         switching to SNMPv2c. Unfortunately not all devices
         support SNMPv2c yet. If it works, this will prevent your
         counters from wraping within the 5 minute polling
         interval. As we now use 64 bit instead of the normal 32
         bit.

         Example:

          Target[ezwf]: 2:public@router1:::::2


     Reversing
         Sometimes you are sitting on the wrong side of the link,
         and you would like to have mrtg report Incoming traffic
         as outgoing and vice versa. This can be achieved by
         adding the '-' sign in front of the "Target"
         description. It flips the incoming and outgoing traffic
         rates.

         Example:

          Target[ezci]: -1:public@ezci-ether.ethz.ch


     Explicit OIDs
         You can also explicitly define the OID to query by using
         the following syntax 'OID_1&OID_2:community@router' The
         following example will retrieve error counts for input
         and output on interface 1.  MRTG needs to graph two
         variables, so you need to specify two OID's such as
         temperature and humidity or error input and error
         output.

         Example:

          Target[ezwf]: 1.3.6.1.2.1.2.2.1.14.1&1.3.6.1.2.1.2.2.1.20.1:public@myrouter



2001-02-20             Last change: 2.9.10                      7






mrtg                                                 REFERENCE(1)



     MIB Variables
         MRTG knows a number of symbolical SNMP variable names.
         See the file mibhelp.txt for a list of known names.  One
         example are the ifInErrors and ifOutErrors.  This means
         you can specify the above as:

         Example:

          Target[ezwf]: ifInErrors.1&ifOutErrors.1:public@myrouter


     Interface by IP
         Sometimes SNMP interface index can change, like when new
         interfaces are added or removed. This can cause all
         Target entries in your config file to become wrong by
         offset, causing MRTG to graphs wrong instances etc.
         MRTG supports IP address instead of ifindex in target
         definition. Then MRTG will query snmp device and try to
         map IP address to current ifindex, You can use IP
         address in every type of target definition, by adding IP
         address of the numbered interface after OID and
         separation char '/'

         Make sure that given IP address is used on your same
         target router, your same target router, especially when
         graphing two different OIDs and/or interface split by
         '&' delimiter.

         You can tell cfgmaker to generate such references with
         the option --------iiiiffffrrrreeeeffff====iiiipppp.

         Example:

          Target[ezwf]: /1.2.3.4:public@wellfleet-fddi.ethz.ch
          Target[ezci]: -/1.2.3.4:public@ezci-ether.ethz.ch
          Target[ezwf]: 1.3.6.1.2.1.2.2.1.14/1.2.3.4&1.3.6.1.2.1.2.2.1.14/1.2.3.4:public@myrouter
          Target[ezwf]: ifInErrors/1.2.3.4&ifOutErrors/1.2.3.4:public@myrouter


     Interface by Description
         If you can not use IP addresses you might want to use
         the interface names. This works similar to the IP
         address aproach only that the prefix to use is a \
         instead of a /

         You can tell cfgmaker to generate such references with
         the option --------iiiiffffrrrreeeeffff====ddddeeeessssccccrrrr.

         Example:






2001-02-20             Last change: 2.9.10                      8






mrtg                                                 REFERENCE(1)



          Target[ezwf]: \My-Interface2:public@wellfleet-fddi.ethz.ch
          Target[ezci]: -\My-Interface2:public@ezci-ether.ethz.ch
          Target[ezwf]: 1.3.6.1.2.1.2.2.1.14\My-Interface2&1.3.6.1.2.1.2.2.1.14\My-Interface3:public@myrouter
          Target[ezwf]: ifInErrors\My-Interface2&ifOutErrors\My-Interface3:public@myrouter

         If your description contains a "&", a ":", a "@" or a "
         " you can include them but you must escape with a
         backlash:

          Target[ezwf]: \fun\: \ ney\&ddd:public@hello.router


     Interface by Name
         The only sensible way to reference interfaces of your
         switches.

         You can tell cfgmaker to generate such references with
         the option --------iiiiffffrrrreeeeffff====nnnnaaaammmmeeee.

         Example:

          Target[ezwf]: #2/11:public@wellfleet-fddi.ethz.ch
          Target[ezci]: -#2/11:public@ezci-ether.ethz.ch
          Target[ezwf]: 1.3.6.1.2.1.2.2.1.14#3/7&1.3.6.1.2.1.2.2.1.14#3/7:public@myrouter
          Target[ezwf]: ifInErrors#3/7&ifOutErrors#3/7:public@myrouter

         If your description contains a "&", a ":", a "@" or a "
         " you can include them but you must escape with a
         backlash:

          Target[ezwf]: #\: \ fun:public@hello.router

         _N_o_t_e _t_h_a_t _t_h_e _# _s_i_g_n _w_i_l_l _b_e _i_n_t_e_r_p_r_e_t_e_d _a_s _a _c_o_m_m_e_n_t
         _c_h_a_r_a_c_t_e_r _i_f _i_t _i_s _t_h_e _f_i_r_s_t _n_o_n _w_h_i_t_e_-_s_p_a_c_e _c_h_a_r_a_c_t_e_r
         _o_n _t_h_e _l_i_n_e_.

     Interface by Ethernet Address
         When the SNMP interface index changes, you can key that
         interface by its 'Physical Address', sometimes called a
         'hard address', which is the SNMP variable
         'ifPhysAddress'.  Internally, MRTG matches the Physical
         Address from the *.cfg file to its current index, and
         then uses that index for the rest of the session.

         You can use the Physical Address in every type of target
         definition, by adding the Physical Address after the OID
         and separation char '!' (analogous to the IP address
         option).  The Physical address is specified as '-'
         delimited octets, such as "0a-0-f1-5-23-18" (omit the
         double quotes). Note that some routers use the same
         Hardware Ethernet Address for all their Interface which
         prevents unique interface identification. Mrtg will



2001-02-20             Last change: 2.9.10                      9






mrtg                                                 REFERENCE(1)



         notice such problems and alert you.

         You can tell cfgmaker to generate configuration files
         with hardware ethernet address references by using the
         option --------iiiiffffrrrreeeeffff====eeeetttthhhh.

         Example:

          Target[ezwf]: !0a-0b-0c-0d:public@wellfleet-fddi.ethz.ch
          Target[ezci]: -!0-f-bb-05-71-22:public@ezci-ether.ethz.ch
          Target[ezwf]: 1.3.6.1.2.1.2.2.1.14!0a-00-10-23-44-51&!0a-00-10-23-44-51:public@myrouter
          Target[ezwf]: ifInErrors!0a-00-10-23-44-51&ifOutErrors!0a-00-10-23-44-51:public@myrouter


     Interface by Type
         It seems that there are devices that try to defy all
         monitoring efforts, the interesting interfaces have
         neither ifName nor a constant ifDescr not to think of a
         persistant ifIndex. The only way to get a constant
         mapping is by looking at the interface type, because the
         interface you are interested in is unique in the device
         you are looking at ...

         You can tell cfgmaker to generate such references with
         the option --------iiiiffffrrrreeeeffff====ttttyyyyppppeeee.

         Example:

          Target[ezwf]: %13:public@wellfleet-fddi.ethz.ch
          Target[ezci]: -%13:public@ezci-ether.ethz.ch
          Target[ezwf]: 1.3.6.1.2.1.2.2.1.14%13&1.3.6.1.2.1.2.2.1.14%14:public@myrouter
          Target[ezwf]: ifInErrors%13&ifOutErrors%14:public@myrouter


     Extended Host Name Syntax
         In all places where ``community@router'' is accepted,
         you can add additional parameters for the SNMP
         communication using colon-separated suffixes. The full
         syntax is as follows:

          community@router[:[port][:[timeout][:[retries][:[backoff][:version]]]]]

         where the meaning of each parameter is as follows:

         port
             the UDP port under which to contact the SNMP agent
             (default: 161)

         timeout
             initial timeout for SNMP queries, in seconds
             (default: 2.0)




2001-02-20             Last change: 2.9.10                     10






mrtg                                                 REFERENCE(1)



         retries
             number of times a timed-out request will be retried
             (default: 5)

         backoff
             factor by which the timeout is multiplied on every
             retry (default: 1.0).

         version
             for SNMP version if you have a fast router you might
             want to put a '2' here. This will make mrtg try to
             poll the 64 bit counters. And thus prevent excessive
             counter wrapping. Not all routers support this
             though.

             Example:

              3:public@router1:::::2


         A value that equals the default value can be omitted.
         Trailing colons can be omitted, too.

         Example:

           Target[ezci]: 1:public@ezci-ether.ethz.ch:9161::4

         This would refer to the input/output octet counters for
         the interface with _i_f_I_n_d_e_x _1 on _e_z_c_i_-_e_t_h_e_r_._e_t_h_z_._c_h, as
         known by the SNMP agent listening on UDP port 9161.  The
         standard initial timeout (2.0 seconds) is used, but the
         number of retries is set to four.  The backoff value is
         the default.

     External Monitoring Scripts
         if you want to monitor something which does not provide
         data via snmp you can use some external program to do
         the data gathering.

         The external command must return 4 lines of output:

         Line 1
             current state of the first variable, normally
             'incoming bytes count'

         Line 2
             current state of the second variable, normally
             'outgoing bytes count'

         Line 3
             string (in any human readable format), telling the
             uptime of the target.



2001-02-20             Last change: 2.9.10                     11






mrtg                                                 REFERENCE(1)



         Line 4
             string, telling the name of the target.

         Depending on the type of data your script returns you
         might want to use the 'gauge' or 'absolute' arguments
         for the _O_p_t_i_o_n_s keyword.

         Example:

          Target[ezwf]: `/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0`

         Note the use of the backticks (`), not apostrophes (')
         around the command.

         If you want to use a backtick in the command  name this
         can be done but you must escape it with a backslash ...

     Multi Target Syntax
         You can also use several statements in a mathematical
         expression.  This could be used to aggregate both B
         channels in an ISDN connection or multiple T1s that are
         aggregated into a single channel for greater bandwidth.
         Note the whitespace arround the target definitions.

         Example:

          Target[ezwf]: 2:public@wellfleetA + 1:public@wellfleetA
                       * 4:public@ciscoF


     RRRRoooouuuutttteeeerrrrUUUUppppttttiiiimmmmeeee

     In cases where you calculate the used bandwidth from several
     interfaces you normaly don't get the router uptime and
     router name displayed on the web page.

     If these interfaces are on the same router and the uptime
     and name should be displayed nevertheless you have to
     specify its community and address again with the
     _R_o_u_t_e_r_U_p_t_i_m_e keyword.

     Example:

      Target[kacisco.comp.edu]: 1:public@194.64.66.250 + 2:public@194.64.66.250
      RouterUptime[kacisco.comp.edu]: public@194.64.66.250


     MMMMaaaaxxxxBBBByyyytttteeeessss

     The maximum value either of the two variables monitored are
     allowed to reach. For monitoring router traffic this is
     normally specified in bytes per second this interface port



2001-02-20             Last change: 2.9.10                     12






mrtg                                                 REFERENCE(1)



     can carry.

     If a number higher than _M_a_x_B_y_t_e_s is returned, it is ignored.
     Also read the section on _A_b_s_M_a_x for further info.  The
     _M_a_x_B_y_t_e_s value is also used in calculating the Y range for
     unscaled graphs (see the section on _U_n_s_c_a_l_e_d).

     Since most links are rated in bits per second, you need to
     divide their maximum bandwidth (in bits) by eight (8) in
     order to get bytes per second.  This is very important to
     make your unscaled graphs display realistic information.  T1
     = 193000, 56K = 7000, Ethernet = 1250000. The _M_a_x_B_y_t_e_s value
     will be used by mrtg to decide whether it got a valid
     response from the router.

     If you need two different MaxBytes values for the two
     monitored variables, you can use MaxBytes1 and MaxBytes2
     instead of MaxBytes.

     Example:

      MaxBytes[ezwf]: 1250000


     MMMMaaaaxxxxBBBByyyytttteeeessss1111

     Same as MaxBytes, for variable 1.

     MMMMaaaaxxxxBBBByyyytttteeeessss2222

     Same as MaxBytes, for variable 2.

     TTTTiiiittttlllleeee

     Title for the HTML page which gets generated for the graph.

     Example:

      Title[ezwf]: Traffic Analysis for Our Nice Company


     PPPPaaaaggggeeeeTTTToooopppp

     Things to add to the top of the generated HTML page.  Note
     that you can have several lines of text as long as the first
     column is empty.

     Note that the continuation lines will all end up on the same
     line in the html page. If you want linebreaks in the
     generated html use the '\n' sequence.





2001-02-20             Last change: 2.9.10                     13






mrtg                                                 REFERENCE(1)



     Example:

      PageTop[ezwf]: <H1>Traffic Analysis for ETZ C95.1</H1>
        Our Campus Backbone runs over an FDDI line\n
        with a maximum transfer rate of 12.5 megabytes per
        Second.


OOOOPPPPTTTTIIIIOOOONNNNAAAALLLL PPPPEEEERRRR TTTTAAAARRRRGGGGEEEETTTT PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
     PPPPaaaaggggeeeeFFFFooooooootttt

     Things to add to the bottom of the generated HTML page.
     Note that you can have several lines of text as long as the
     first column is empty.

     Note that the continuation lines will all end up on the same
     line in the html page. If you want linebreaks in the
     generated html use the '\n' sequence.

     The material will be added just before the </BODY> tag:

     Example:

      PageFoot[ezwf]: Contact <A HREF="mailto:peter@x.yz">Peter</A>
       if you have questions regarding this page


     AAAAddddddddHHHHeeeeaaaadddd

     Use this tag like the _P_a_g_e_T_o_p header, but its contents will
     be added between </TITLE> and </HEAD>.

     Example:

      AddHead[ezwf]: <link rev="made" href="mailto:mrtg@blabla.edu">


     BBBBooooddddyyyyTTTTaaaagggg

     BodyTag lets you supply your very own <body ...> tag for the
     generated webpages.

     Example:

      BodyTag[ezwf]: <BODY LEFTMARGIN="1" TOPMARGIN="1"
                           BACKGROUND="/stats/images/bg.neo2.gif">


     AAAAbbbbssssMMMMaaaaxxxx

     If you are monitoring a link which can handle more traffic
     than the _M_a_x_B_y_t_e_s value. Eg, a line which uses compression



2001-02-20             Last change: 2.9.10                     14






mrtg                                                 REFERENCE(1)



     or some frame relay link, you can use the _A_b_s_M_a_x keyword to
     give the absolute maximum value ever to be reached.  We need
     to know this in order to sort out unrealistic values
     returned by the routers. If you do not set _A_b_s_M_a_x, rateup
     will ignore values higher than _M_a_x_B_y_t_e_s.

     Example:

      AbsMax[ezwf]: 2500000


     UUUUnnnnssssccccaaaalllleeeedddd

     By default each graph is scaled vertically to make the
     actual data visible even when it is much lower than
     _M_a_x_B_y_t_e_s.  With the _U_n_s_c_a_l_e_d variable you can suppress this.
     It's argument is a string, containing one letter for each
     graph you don't want to be scaled: d=day w=week m=month
     y=year.  In the example scaling for the yearly and the
     monthly graph are suppressed.

     Example:

      Unscaled[ezwf]: ym


     WWWWiiiitttthhhhPPPPeeeeaaaakkkk

     By default the graphs only contain the average values of the
     monitored variables - normally the transfer rates for
     incoming and outgoing traffic.  The following option
     instructs mrtg to display the peak 5 minute values in the
     [w]eekly, [m]onthly and [y]early graph. In the example we
     define the monthly and the yearly graph to contain peak as
     well as average values.

     Examples:

      WithPeak[ezwf]: ym


     SSSSuuuupppppppprrrreeeessssssss

     By default mrtg produces 4 graphs. With this option you can
     suppress the generation of selected graphs.  The option
     value syntax is analogous to the above two options.  In this
     example we suppress the yearly graph as it is quite empty in
     the beginning.

     Example:





2001-02-20             Last change: 2.9.10                     15






mrtg                                                 REFERENCE(1)



      Suppress[ezwf]: y


     EEEExxxxtttteeeennnnssssiiiioooonnnn

     By default, mrtg creates .html files. Use this option to
     tell mrtg to use a different extension. For example you
     could set the extension to php3, then you will be able to
     enclose PHP tags into the output (usefull for getting a
     router name out of a database).

     Example:

      Extension[ezwf]: phtml


     DDDDiiiirrrreeeeccccttttoooorrrryyyy

     By default, mrtg puts all the files that it generates for
     each target (the GIFs, the HTML page, the log file, etc.) in
     _W_o_r_k_D_i_r.

     If the _D_i_r_e_c_t_o_r_y option is specified, the files are instead
     put into a directory under _W_o_r_k_D_i_r or Log-, Image- and
     HtmlDir).  (For example the _D_i_r_e_c_t_o_r_y option below would
     cause all the files for a target ezwf to be put into
     directory /usr/tardis/pub/www/stats/mrtg/ezwf/ .)

     The directory must already exist; mrtg will not create it.

     Example:

      WorkDir: /usr/tardis/pub/www/stats/mrtg
      Directory[ezwf]: ezwf

     NOTE: the Directory option must always be 'relative' or bad
     things will happen.

     XXXXSSSSiiiizzzzeeee aaaannnndddd YYYYSSSSiiiizzzzeeee

     By default mrtgs graphs are 100 by 400 pixels wide (plus
     some more for the labels. In the example we get almost
     square graphs ...

     Note: XSize must be between 20 and 600; YSize must be larger
     than 20

     Example:

      XSize[ezwf]: 300
      YSize[ezwf]: 300




2001-02-20             Last change: 2.9.10                     16






mrtg                                                 REFERENCE(1)



     XXXXZZZZoooooooommmm aaaannnndddd YYYYZZZZoooooooommmm

     If you want your graphs to have larger pixels, you can
     "Zoom" them.

     Example:

      XZoom[ezwf]: 2.0
      YZoom[ezwf]: 2.0


     XXXXSSSSccccaaaalllleeee aaaannnndddd YYYYSSSSccccaaaalllleeee

     If you want your graphs to be actually scaled use _X_S_c_a_l_e and
     _Y_S_c_a_l_e. (Beware while this works, the results look ugly (to
     be frank) so if someone wants to fix this: patches are
     welcome.

     Example:

      XScale[ezwf]: 1.5
      YScale[ezwf]: 1.5


     YYYYTTTTiiiiccccssss aaaannnndddd YYYYTTTTiiiiccccssssFFFFaaaaccccttttoooorrrr

     If you want to show more than 4 lines per graph, use YTics.
     If you want to scale the value used for the YLegend of these
     tics, use YTicsFactor.  The default value for YTics is 4 and
     the default value for YTicsFactor is 1.0 .

     Example:

       Suppose you get values ranging from 0 to 700.
       You want to plot 7 lines and want to show
       0, 1, 2, 3, 4, 5, 6, 7 instead of 0, 100, 200,
       300, 400, 500, 600, 700.  You should write then:

       YTics[ezwf]: 7
       YTicsFactor[ezwf]: 0.01


     FFFFaaaaccccttttoooorrrr

     If you want to multiply all numbers shown below the graph
     with a constant factor, use this directive to define it ..

     Example:

       Factor[as400]: 4096





2001-02-20             Last change: 2.9.10                     17






mrtg                                                 REFERENCE(1)



     SSSStttteeeepppp

     Change the default step from 5 * 60 seconds to something
     else (I have not tested this well ...)

     Example:

      Step[ezwf]: 60


     OOOOppppttttiiiioooonnnnssss

     The _O_p_t_i_o_n_s Keyword allows you to set some boolean switches:

     growright
         The graph grows to the left by default.  This option
         flips the direction of growth causing the current time
         to be at the right edge of the graph and the history
         values to the left of it.

     bits
         All the monitored variable values are multiplied by 8
         (i.e. shown in bits instead of bytes) ... looks much
         more impressive :-) It also affects the 'factory
         default' labeling and units for the given target.

     perminute
         All the monitored variable values are multiplied by 60
         (i.e. shown in units per minute instead of units per
         second) in case of small values more accurate graphs are
         displayed.  It also affects the 'factory default'
         labeling and units for the given target.

     perhour
         All the monitored variable values are multiplied by 3600
         (i.e. shown in units per hour instead of units per
         second) in case of small values more accurate graphs are
         displayed.  It also affects the 'factory default'
         labeling and units for the given target.

     noinfo
         Suppress the information about uptime and device name in
         the generated webpage.

     nopercent
         Don't print usage percentages

     transparent
         make the background of the generated gifs transparent
         ...





2001-02-20             Last change: 2.9.10                     18






mrtg                                                 REFERENCE(1)



     integer
         Print summary lines below graph as integers without
         comma

     dorelpercent
         The relative percentage of IN-traffic to OUT-traffic is
         calculated and displayed in the graph as an additional
         line.  Note: Only a fixed scale is available (from 0 to
         100%). Therefore for IN-traffic greater than OUT-traffic
         also 100% is displayed.  If you suspect that your IN-
         traffic is not always less than or equal to your OUT-
         traffic you are urged to not use this options.  Note: If
         you use this option in combination with the _C_o_l_o_u_r_s
         options, a fifth colour-name colour-value pair is
         required there.

     gauge
         Treat the values gathered from target as 'current
         status' measurements and not as ever incrementing
         counters.  This would be useful to monitor things like
         disk space, processor load, temperature, and the like
         ...

         In the absence of 'gauge' or 'absolute' options, MRTG
         treats variable as a counter and calculates the
         difference between the current and the previous value
         and divides that by the elapsed time between the last
         two readings to get the value to be plotted.

     absolute
         This is for counter type data sources which reset their
         value when they are read. This means that rateup does
         not have to build the difference between the current and
         the last value read from the data source. The value
         obtained is still divided by the elapsed time between
         the current and the last reading, which makes it
         different from the 'gauge' option. Useful for external
         data gatherers.

     unknaszero
         Log unknown data as zero instead of the default
         behaviour of repeating the last value seen. Be careful
         with this, often a flat line in the graph is much more
         obvious than a line at 0.

     withzeroes
         Normally we ignore all values which are zero when
         calculating the average transfer rate on a line. If this
         is not desirable use this option.

     Example:




2001-02-20             Last change: 2.9.10                     19






mrtg                                                 REFERENCE(1)



      Options[ezwf]: growright, bits


     kkkkiiiilllloooo

     Use this option to change the multiplier value for building
     prefixes. Defaultvalue is 1000. This tag is for the special
     case that 1kB = 1024B, 1MB = 1024kB and so far.

     Example:

      kilo[ezwf]: 1024


     kkkkMMMMGGGG

     Change the default multiplier prefixes (,k,M,G,T,P). In the
     tag _S_h_o_r_t_L_e_g_e_n_d define only the basic units.  Format: Comma
     seperated list of prefixed. Two consecutive commas or a
     comma at start or end of the line gives no prefix on this
     item.  Note: If you do not want prefixes, then leave this
     line blank.

     Example: velocity in nm/s (nanometers per second) displayed
     in nm/h.

      ShortLegend[ezwf]: m/min
      kMG[ezwf]: n,u,m,,k,M,G,T,P
      options[ezwf]: perhour


     CCCCoooolllloooouuuurrrrssss

     The _C_o_l_o_u_r_s tag allows you to override the default colour
     scheme.  Note: All 4 of the required colours must be
     specified here. The colour name ('Colourx' below) is the
     legend name displayed, while the RGB value is the real
     colour used for the display, both on the graph and in the
     html doc.

     Format is:
     Colour1#RRGGBB,Colour2#RRGGBB,Colour3#RRGGBB,Colour4#RRGGBB

     Important: If you use the _d_o_r_e_l_p_e_r_c_e_n_t options tag a fifth
     colour name colour value pair is required:
     Colour1#RRGGBB,Colour2#RRGGBB,Colour3#RRGGBB,Colour4#RRGGBB,Colour5#RRGGBB

     Colour1
         First variable (normally Input) on default graph

     Colour2
         Second variable (normally Output) on default graph



2001-02-20             Last change: 2.9.10                     20






mrtg                                                 REFERENCE(1)



     Colour3
         Max first variable (input)

     Colour4
         Max second variable (output)

     RRGGBB
         2 digit hex values for Red, Green and Blue

     Example:

      Colours[ezwf]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff


     BBBBaaaacccckkkkggggrrrroooouuuunnnndddd

     With the _B_a_c_k_g_r_o_u_n_d tag you can configure the background
     colour of the generated HTML page

     Example:

      Background[ezwf]: #a0a0a0a


     YYYYLLLLeeeeggggeeeennnndddd,,,, SSSShhhhoooorrrrttttLLLLeeeeggggeeeennnndddd,,,, LLLLeeeeggggeeeennnndddd[[[[1111222233334444]]]]

     The following keywords allow you to override the text
     displayed for the various legends of the graph and in the
     HTML document

     YLegend
         The Y-axis label of the graph. Note that a text which is
         too long to fit in the graph will be silently ignored.

     ShortLegend
         The units string (default 'b/s') used for Max, Average
         and Current

     Legend[1234IO]
         The strings for the colour legend

     Example:

       YLegend[ezwf]: Bits per Second
       ShortLegend[ezwf]: b/s
       Legend1[ezwf]: Incoming Traffic in Bits per Second
       Legend2[ezwf]: Outgoing Traffic in Bits per Second
       Legend3[ezwf]: Maximal 5 Minute Incoming Traffic
       Legend4[ezwf]: Maximal 5 Minute Outgoing Traffic
       LegendI[ezwf]: &nbsp;In:
       LegendO[ezwf]: &nbsp;Out:




2001-02-20             Last change: 2.9.10                     21






mrtg                                                 REFERENCE(1)



     Note, if _L_e_g_e_n_d_I or _L_e_g_e_n_d_O are set to an empty string with

      LegendO[ezwf]:

     The corresponding line below the graph will not be printed
     at all.

     TTTTiiiimmmmeeeezzzzoooonnnneeee

     If you live in an international world, you might want to
     generate the graphs in different timezones. This is set in
     the TZ variable. Under certain operating systems like
     Solaris, this will provoke the localtime call to give the
     time in the selected timezone ...

     Example:

      Timezone[ezwf]: Japan

     The Timezone is the standard Solaris timezone, ie Japan,
     Hongkong, GMT, GMT+1 etc etc.

     WWWWeeeeeeeekkkkffffoooorrrrmmmmaaaatttt

     By default, mrtg (actually rateup) uses the _s_t_r_f_t_i_m_e(3) '%W'
     option to format week numbers in the monthly graphs.  The
     exact semantics of this format option vary between systems.
     If you find that the week numbers are wrong, and your
     system's _s_t_r_f_t_i_m_e(3) routine supports it, you can try
     another format option.  The POSIX '%V' option seems to
     correspond to a widely used week numbering convention.  The
     week format character should be specified as a single
     letter; either W, V, or U.

     Example:

      Weekformat[ezwf]: V


     SSSSeeeettttEEEEnnnnvvvv

     When calling external scrits from withing your cfg file
     (Threshold or script targets) you might want to pass some
     data on to the script. This can be done with the SetEnv
     configuration option ... it takes a series of environment
     variable assignments. Note that the quotes are mandatory.

     Example:

      SetEnv[myrouter]:  EMAIL="contact_email@someplace.net"
                         HOST="www.some_server.net"
                         URL="http://www.some_server.net/path/mrtg.html"



2001-02-20             Last change: 2.9.10                     22






mrtg                                                 REFERENCE(1)



TTTTHHHHRRRREEEESSSSHHHHOOOOLLLLDDDD CCCCHHHHEEEECCCCKKKKIIIINNNNGGGG
     Through its threshold checking functionality mrtg is able to
     detect threshold problems for the various targets and can
     call external scripts to handle those problems (send email
     or a page to an administrator).

     Threshold checking is configured through the following
     parameters:

     TTTThhhhrrrreeeesssshhhhDDDDiiiirrrr ((((GGGGLLLLOOOOBBBBAAAALLLL))))

     By defining ThreshDir to point to a writable directory, MRTG
     will only alert you when a threshold boundery has been
     crossed.

     Example:

      ThershDir: /var/mrtg/thresh


     TTTThhhhrrrreeeesssshhhhMMMMiiiinnnnIIII  ((((PPPPEEEERRRR TTTTAAAARRRRGGGGEEEETTTT))))

     This is the minimum acceptable value for the Input (first)
     parameter.  If the parameter falls below this value, the
     program specified in ThreshProgI will be run. If the value
     ends in '%' then the threshold is defined relative to
     MaxBytes.

     TTTThhhhrrrreeeesssshhhhMMMMaaaaxxxxIIII ((((PPPPEEEERRRR TTTTAAAARRRRGGGGEEEETTTT))))

     This is the maximum acceptable value for the Input (first)
     parameter.  If the parameter falls above this value, the
     program specified in ThreshProgI will be run. If the value
     ends in '%' then the threshold is defined relative to
     MaxBytes.

     TTTThhhhrrrreeeesssshhhhDDDDeeeesssscccc ((((PPPPEEEERRRR TTTTAAAARRRRGGGGEEEETTTT))))

     Its value will be assigned to the environment variable
     THRESH_DESC before any of the programs mentioned below are
     called. The programms can use the value of this variable to
     produce more userfriendly output.

     TTTThhhhrrrreeeesssshhhhPPPPrrrrooooggggIIII  ((((PPPPEEEERRRR TTTTAAAARRRRGGGGEEEETTTT))))

     This defines a program to be run if ThreshMinI or ThreshMaxI
     is broken.  MRTG passes 3 arguments: the $router variable,
     the threshold value broken, and the current parameter value.







2001-02-20             Last change: 2.9.10                     23






mrtg                                                 REFERENCE(1)



     TTTThhhhrrrreeeesssshhhhPPPPrrrrooooggggOOOOKKKKIIII  ((((PPPPEEEERRRR TTTTAAAARRRRGGGGEEEETTTT))))

     This defines a program to be run if the parameter is
     currently OK (based on ThreshMinI and ThreshMaxI), but
     wasn't OK on the previous running -- based on the files
     found in ThreshDir. MRTG passes 2 arguments: the $router
     variable and the current parameter value.

     TTTThhhhrrrreeeesssshhhhMMMMiiiinnnnOOOO,,,, TTTThhhhrrrreeeesssshhhhMMMMaaaaxxxxOOOO,,,, TTTThhhhrrrreeeesssshhhhPPPPrrrrooooggggOOOO,,,, aaaannnndddd TTTThhhhrrrreeeesssshhhhPPPPrrrrooooggggOOOOKKKKOOOO

     They work the same as their *I counterparts, except on the
     Output (second) parameter.

     _N_o_t_e_, _t_h_a_t _y_o_u _c_a_n _u_s_e _t_h_e _S_e_t_E_n_v _p_a_r_a_m_e_t_e_r _e_x_p_l_a_i_n_e_d _a_b_o_v_e
     _t_o _p_a_s_s _a_d_d_i_t_i_o_n_a_l _i_n_f_o_r_m_a_t_i_o_n _t_o _t_h_e _t_h_r_e_s_h_o_l_d _p_r_o_g_r_a_m_s_.

PPPPEEEERRRR TTTTAAAARRRRGGGGEEEETTTT DDDDEEEEFFFFAAAAUUUULLLLTTTT VVVVAAAALLLLUUUUEEEESSSS
     PPPPrrrreeee---- aaaannnndddd PPPPoooossssttttffffiiiixxxx

     To save yourself some typing you can define a target called
     '^'. The text of every Keyword you define for this target
     will be PREPENDED to the corresponding Keyword of all the
     targets defined below this line. The same goes for a Target
     called '$' but its text will be APPENDED.

     Note that a space is inserted between the prepended text and
     the Keyword value, as well as between the Keyword value and
     the appended text. This works well for text-valued Keywords,
     but is not very useful for other Keywords. See the "default"
     target description below.

     The example will make mrtg use a common header and a common
     contact person in all the pages generated from targets
     defined later in this file.

     Example:

      PageTop[^]: <H1>NoWhere Unis Traffic Stats</H1><HR>
      PageTop[$]: Contact Peter Norton if you have any questions<HR>

     To remove the prepend/append value, specify an empty value,
     e.g.:

      PageTop[^]:
      PageTop[$]:

     NOTE: With PREPEND and APPEND there is normally a space
     inserted between the local value and the PRE- or APPEND
     value. Sometimes this is not desirable. You can use the
     _N_o_S_p_a_c_e_C_h_a_r config option to define a character which can be
     mentioned at the end of a $ or ^ definition in order to
     supress the space.



2001-02-20             Last change: 2.9.10                     24






mrtg                                                 REFERENCE(1)



     Example:

       NoSpaceChar: ~
       Target[^]: 1.3.6.1.4.1.482.50.2.4.20.0&1.3.6.1.4.1.482.50.2.4.21.0:get@~
       Target[a]: a.tolna.net
       Target[b]: b.tolna.net
       Target[c]: c.tolna.net
       Target[d]: d.tolna.net


     DDDDeeeeffffaaaauuuulllltttt VVVVaaaalllluuuueeeessss

     The target name '_' specifies a default value for that
     Keyword. In the absence of explicit Keyword value, the
     prepended and the appended keyword value, the default value
     will be used.

     Example:

      YSize[_]: 150
      Options[_]: growright,bits,nopercent
      WithPeak[_]: ymw
      Suppress[_]: y
      MaxBytes[_]: 1250000

     To remove the default value and return to the 'factory
     default', specify an empty value, e.g.:

      YLegend[_]:

     There can be several instances of setting the
     default/prepend/append values in the configuration file. The
     later setting replaces the previous one for the rest of the
     configuration file.  The default/prepend/append values used
     for a given keyword/target pair are the ones that were in
     effect at the point in the configuration file where the
     target was mentioned for the first time.

     Example:

      MaxBytes[_]: 1250000
      Target[myrouter.somplace.edu.2]: 2:public@myrouter.somplace.edu
      MaxBytes[_]: 8000
      Title[myrouter.somplace.edu.2]: Traffic Analysis for myrouter.somplace.edu IF 2

     The default _M_a_x_B_y_t_e_s for the target myrouter.somplace.edu.2
     in the above example will be 1250000, which was in effect
     where the target name myrouter.somplace.edu.2 first appeared
     in the config file.

CCCCOOOOMMMMMMMMAAAANNNNDDDD LLLLIIIINNNNEEEE OOOOPPPPTTTTIIIIOOOONNNNSSSS




2001-02-20             Last change: 2.9.10                     25






mrtg                                                 REFERENCE(1)



     --------uuuusssseeeerrrr aaaannnndddd --------ggggrrrroooouuuupppp

     Run as the given user and/or group.

     --------lllloooocccckkkk----ffffiiiilllleeee

     Use an alternate lock-file (the default is to use the
     configuration-file appended with `_l').

EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
     MMMMiiiinnnniiiimmmmaaaallll mmmmrrrrttttgggg....ccccffffgggg

      WorkDir: /usr/tardis/pub/www/stats/mrtg
      Target[r1]: 2:public@myrouter.somplace.edu
      MaxBytes[r1]: 8000
      Title[r1]: Traffic Analysis ISDN
      PageTop[r1]: <H1>Stats for our ISDN Line</H1>


     CCCCffffgggg ffffoooorrrr sssseeeevvvveeeerrrraaaallll RRRRoooouuuutttteeeerrrrssss....

      WorkDir: /usr/tardis/pub/www/stats/mrtg
      Title[^]: Traffic Analysis for
      PageTop[^]: <H1>Stats for
      PageTop[$]: Contact The Chief if you notice anybody<HR>
      MaxBytes[_]: 8000
      Options[_]: growright

      Title[isdn]: our ISDN Line
      PageTop[isdn]: our ISDN Line</H1>
      Target[isdn]: 2:public@router.somplace.edu

      Title[backb]: our Campus Backbone
      PageTop[backb]: our Campus Backbone</H1>
      Target[backb]: 1:public@router.somplace.edu
      MaxBytes[backb]: 1250000

      # the following line removes the default prepend value
      # defined above

      Title[^]:

      Title[isdn2]: Traffic for the Backup ISDN Line
      PageTop[isdn2]: our ISDN Line</H1>
      Target[isdn2]: 3:public@router.somplace.edu


AAAAUUUUTTTTHHHHOOOORRRR
     Tobias Oetiker <oetiker@ee.ethz.ch> and many contributors






2001-02-20             Last change: 2.9.10                     26



