CFGMAKER(1)                    mrtg                   CFGMAKER(1)



NNNNAAAAMMMMEEEE
       cfgmaker - Creates mrtg.cfg files (for mrtg-2.9.12a)

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
       cfgmaker [options] [community@]router [[options] [commu-
       nity@]router ...]

OOOOPPPPTTTTIIIIOOOONNNNSSSS
        --ifref=nr        interface references by Interface Number (default)
        --ifref=ip                         ... by Ip Address
        --ifref=eth                        ... by Ethernet Number
        --ifref=descr                      ... by Interface Description
        --ifref=name                       ... by Interface Name
        --ifref=type                       ... by Interface Type

        --ifdesc=nr       interface description uses Interface Number (default)
        --ifdesc=ip                        ... uses Ip Address
        --ifdesc=eth                       ... uses Ethernet Number
        --ifdesc=descr                     ... uses Interface Description
        --ifdesc=name                      ... uses Interface Name
        --ifdesc=alias                     ... uses Interface Alias
        --ifdesc=type                      ... uses Interface Type

        --global "x: a"   add global config entries

        --no-down         do not look at admin or opr status of interfaces

        --show-op-down    show interfaces which are operatively down

        --descint         describe interface instead of just 'Traffic Analysis for'

        --subdirs=format  give each router its own subdirectory, naming each per
                          "format", in which HOSTNAME and SNMPNAME will be
                          replaced by the values of those items -- for instance,
                          --subdirs=HOSTNAME or --subdirs="HOSTNAME (SNMPNAME)"

        --noreversedns    do not reverse lookup ip numbers

        --community=cmty  Set the default community string to "cmty" instead of
                          "public".

        --snmp-options=:[<port>][:[<tmout>][:[<retr>][:[<backoff>][:<ver>]]]]

                          Specify default SNMP options to be appended to all
                          routers following.  Individual fields can be empty.
                          Routers following might override some or all of the
                          options given to --snmp-options.

        --dns-domain=domain
                          Specifies a domain to append to the name of all
                          routers following.

        --help            brief help message
        --man             full documentation
        --version         print the version of cfgmaker

        --output=file     output filename default is STDOUT


DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
       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 creates MRTG configuration files based on infor-
       mation pulled from a router or another SNMP manageable
       device.

       [_c_o_m_m_u_n_i_t_y@@@@]_r_o_u_t_e_r

       _C_o_m_m_u_n_i_t_y is the community name of the device you want to
       create a configuration for. If not specified, it defaults
       to 'ppppuuuubbbblllliiiicccc'; you might want to try this first if you do
       not know the community name of a device. If you are using
       the wrong comunity name you will get no response from the
       device.

       _R_o_u_t_e_r is the DNS name or the IP number of an SNMP-man-
       agable device.  Following the name you can specify 6 fur-
       ther options separated by colons.  The full syntax looks
       like this:

       rrrroooouuuutttteeeerrrr[:[pppprrrrtttt][:[ttttmmmmoooouuuutttt][:[rrrreeeettttrrrr][:[bbbbaaaacccckkkkooooffffffff][:vvvveeeerrrrssss]]]]]

       Of special interest may be the last parameter, vvvveeeerrrrssss.  If
       you set this to '2' then your device will be queried with
       SNMP version 2 requests. This allows to poll the 64 bit
       traffic counters in the device and will thus work much
       better with fast interfaces (no more counter overrun).
       Note that the order in which the routers are specified on
       the command line do matter as the same order is used when
       the configuration file is generated.  The first specified
       router has it's configuration lines genrated first, fol-
       lowed by the lines belonging to the next router and so on.

       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

       Except for the --------oooouuuuttttppppuuuutttt and --------gggglllloooobbbbaaaallll options, all options
       affect only the routers following them on the command
       line.  If an option specified earlier on the command line
       reappears later on the command line with another value,
       the new value overrides the old value as far as remaining
       routers are concerned.  This way options might be tailored
       for groups of routers or for individual routers.

       See --------oooouuuuttttppppuuuutttt and --------gggglllloooobbbbaaaallll for how their behaviour is
       affected by where or how many times they appear on the
       command line.

       See the 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 below on how to set an option differently
       for multiple routers.

       --------hhhheeeellllpppp
           Print a brief help message and exit.

       --------mmmmaaaannnn
           Prints the manual page and exits.

       --------vvvveeeerrrrssssiiiioooonnnn
           Print the version of cfgmaker.  This should match the
           version of MRTG for which config files are being cre-
           ated.

       --------iiiiffffrrrreeeeffff nnnnrrrr|iiiipppp|eeeetttthhhh|ddddeeeessssccccrrrr|nnnnaaaammmmeeee
           Select the interface identification method.  Default
           is nnnnrrrr which identifies the router interfaces by their
           number.  Unfortunately the interface numbering scheme
           in an SNMP tree can change. Some routers change their
           numbering when new interfaces are added, others change
           thier numbering every full moon just for fun.

           To work around this sad problem MRTG can identify
           interfaces by 4 other properties. None of these works
           for all interfaces, but you should be able to find one
           which does fine for you. Note that especially ethernet
           addrsses can be problematic as some routers have the
           same ethernet address on most of their interface
           cards.

           Select iiiipppp to identify the interface by its IP number.
           Use eeeetttthhhh to use the ethernet address for identifica-
           tion. Use ddddeeeessssccccrrrr to use the Interface description. Or
           use nnnnaaaammmmeeee to use the Interface name.

           If your chosen method does not allow unique interface
           identification on the device you are querying, ccccffffgggg----
           mmmmaaaakkkkeeeerrrr will tell you about it.

       --------iiiiffffddddeeeesssscccc nnnnrrrr|iiiipppp|eeeetttthhhh|ddddeeeessssccccrrrr|nnnnaaaammmmeeee|ttttyyyyppppeeee|aaaalllliiiiaaaassss
           Select what to use as the description of the inter-
           face.  The description appears in the "Title[]" prop-
           erty for the target as well as the text header in the
           HTML code defined in the target's "PageTop[]".
           Default is to use nnnnrrrr which is just the interface num-
           ber which isn't always useful to the viewer of the
           graphs.

           There are 6 other properties which could be used.  Use
           iiiipppp if you want to use the interface's IP-address.  Use
           eeeetttthhhh if you want to use the interface's ethernet
           address.  If you want a better description, you can
           use either ddddeeeessssccccrrrr, nnnnaaaammmmeeee or aaaalllliiiiaaaassss.  Exactly what each of
           these do varies between different equipment so you
           might need to experiment.  For instance, for a serial
           interface on a Cisco router running IOS using nnnnaaaammmmeeee
           might result in ""S0"" being the interface description
           , ddddeeeessssccccrrrr might result in ""Serial0"" and aaaalllliiiiaaaassss might
           result in ""Link to HQ"" (provided that is what is
           used as the interface's "description" in the router's
           configuration).

           Finally, if you want to describe the interface by it's
           Btype (i.e ""ethernetCSMA"", ""propPointtoPoint"" etc)
           you can use ttttyyyyppppeeee.  This is roughly equivalent to the
           --------ddddeeeesssscccciiiinnnntttt option above.

       --------ccccoooommmmmmmmuuuunnnniiiittttyyyy ccccoooommmmmmmmuuuunnnniiiittttyyyy----ssssttttrrrriiiinnnngggg
           Use this to set the community for the routers follow-
           ing on the command line to ccccoooommmmmmmmuuuunnnniiiittttyyyy----ssssttttrrrriiiinnnngggg.  Individ-
           ual routers might overrride this community string by
           using the syntax ccccoooommmmmmmmuuuunnnniiiittttyyyy@@@@rrrroooouuuutttteeeerrrr.

       --------ssssnnnnmmmmpppp----ooooppppttttiiiioooonnnnssss  :[ppppoooorrrrtttt][:[ttttiiiimmmmeeeeoooouuuutttt][:[rrrreeeettttrrrriiiieeeessss][:[bbbbaaaacccckkkk----
       ooooffffffff][:vvvveeeerrrrssssiiiioooonnnn]]]]
           Use this to set the default SNMP options for all
           routers following on the command line.  Individual
           values might be omitted as well as trailing colons.
           Note that routers might override individual (or all)
           values specified by --------ssssnnnnmmmmpppp----ooooppppttttiiiioooonnnnssss by using the syntax

           rrrroooouuuutttteeeerrrr[:[ppppoooorrrrtttt][:[ttttiiiimmmmeeeeoooouuuutttt][:[rrrreeeettttrrrriiiieeeessss][:[bbbbaaaacccckkkkooooffffffff][:vvvveeeerrrr----
           ssssiiiioooonnnn]]]]]

       --------gggglllloooobbbbaaaallll """"""""_b_l_a_: _a_b_c""""""""
           Use this to add global options to the generated config
           file.  You can call --------gggglllloooobbbbaaaallll several times to add mul-
           tiple options.  The line will appear in the configura-
           tion just before the config for the next router
           appearing on the command line.

            --global "workdir: /home/mrtg"

           If you want some default Options you might want to put

            --global "options[_]: growright,bits"

           Specifying --------gggglllloooobbbbaaaallll after the last router on the com-
           mand line will create a line in the configuration file
           which will appear after all the routers.

       --------nnnnoooorrrreeeevvvveeeerrrrsssseeeeddddnnnnssss
           Do not try to reverse lookup IP numbers ... a must for
           DNS free environments.

       --------nnnnoooo----ddddoooowwwwnnnn
           Normally cfgmaker will not include interfaces which
           are marked anything but administratively and opera-
           tionally UP. With this switch you get them all.

       --------sssshhhhoooowwww----oooopppp----ddddoooowwwwnnnn
           Include interfaces which are operatively down.

       --------ssssuuuubbbbddddiiiirrrrssss _f_o_r_m_a_t
           Give each router its own subdirectory for the HTML and
           graphics (or .rrd) files.  The directory name is the
           given _f_o_r_m_a_t string with a couple of pattern replace-
           ments.  The string "HOSTNAME" will be replaced by the
           hostname of the router (however you specified it on
           the 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 commandline -- it may be an actual host-
           name or just an IP address), and "SNMPNAME" will be
           replaced with the device's idea of its own name (the
           same name that appears on the right side of the
           "Title" lines).  For instance, a call like:

            cfgmaker --subdirs=HOSTNAME__SNMPNAME public@10.10.0.18

           would result in the generation of lines looking some-
           thing like:

            Directory[10.10.0.18_1]: 10.10.0.18__fp2200-bothrip-1.3


       --------oooouuuuttttppppuuuutttt _f_i_l_e
           Write the output from 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 into the file _f_i_l_e. The
           default is to use "STDOUT". --------oooouuuuttttppppuuuutttt is expected to
           appear only once on the command line. If used multiple
           times, the file specified by the last --------oooouuuuttttppppuuuutttt will be
           used.

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
       The first example creates a config file for
       _r_o_u_t_e_r_._p_l_a_c_e_._x_y_z:  the router has the community name _p_u_b_-
       _l_i_c.  Interfaces get identified by their IP number.  Two
       global options get added to the config file.  The config
       file gets redirected to _m_r_t_g_._c_o_n_f.  The '\' signs at the
       end of the line mean that this command should be written
       on a single line.

        cfgmaker --global "WorkDir: /home/tobi"           \
                 --global "Options[_]: growright,bits"    \
                 --ifref=ip                               \
                 public@router.place.xyz > mrtg.cfg

       The next example creates a config file for four devices:
       _r_o_u_t_e_r_1_._p_l_a_c_e_._x_y_z, _r_o_u_t_e_r_2_._p_l_a_c_e_._x_y_z, _s_w_i_t_c_h_1_._p_l_a_c_e_._x_y_z
       and _s_w_i_t_c_h_2_._p_l_a_c_e_._x_y_z all with the community _p_u_b_l_i_c.

       The two routers will have --------iiiiffffrrrreeeeffff set to ddddeeeessssccccrrrr whilst the
       two switches will use --------iiiiffffrrrreeeeffff set to nnnnaaaammmmeeee.  Further the
       routers will use --------iiiiffffddddeeeesssscccc set to aaaalllliiiiaaaassss and
       _s_w_i_t_c_h_1_._p_l_a_c_e_._x_y_z will use --------iiiiffffddddeeeesssscccc set to ddddeeeessssccccrrrr whilst
       _s_w_i_t_c_h_2_._p_l_a_c_e_._x_y_z use nnnnaaaammmmeeee instead.

       Finally, there will be two Options lines inserted in the
       configuration: One will be in the beginning, whilst the
       other will be inserted after the lines related to the two
       routers but before those lines related to the switches.

        cfgmaker --global "WorkDir: /home/tobi"           \
                 --global "Options[_]: growright,bits"    \
                 --ifref=descr                            \
                 --ifdesc=alias                           \
                 public@router1.place.xyz                 \
                 public@router2.place.xyz                 \
                 --global "Options[_]: growright"         \
                 --ifref=name                             \
                 --ifdesc=descr                           \
                 public@switch1.place.xyz                 \
                 --ifdesc=name                            \
                 public@switch2.place.xyz > mrtg.cfg

       The next example demonstrates how to use the --------ccccoooommmmmmmmuuuunnnniiiittttyyyy,
       --------ssssnnnnmmmmpppp----ooooppppttttiiiioooonnnnssss and --------ddddnnnnssss----ddddoooommmmaaaaiiiinnnn to make the command line
       simpler.  All the equipment will use the community _h_i_d_d_e_n,
       except for the ppp-server which use community _a_c_c_e_s_s.  All
       equipment uses these SNMP options: 1111ssss ttttiiiimmmmeeeeoooouuuutttt, 1111 rrrreeeettttrrrryyyy and
       SSSSNNNNMMMMPPPP vvvveeeerrrrssssiiiioooonnnn 2222 (bbbbaaaacccckkkkooooffffffff and ppppoooorrrrtttt is unspecified which
       means they use the default values).  The exception again
       is the ppp-server which uses SSSSNNNNMMMMPPPP vvvveeeerrrrssssiiiioooonnnn 1111.  Finally, all
       the equipment is part of the domain _p_l_a_c_e_._x_y_z, except for
       the ppp-server which is part of the domain
       _r_e_m_o_t_e_._p_l_a_c_e_._x_y_z.  Note that the latter is achieved simply
       by specifying the name of the ppp-server to be _p_p_p_-
       _s_e_r_v_e_r_._rr_ee_mm_oo_tt_ee .

        cfgmaker --global "WorkDir: /home/tobi"           \
                 --global "Options[_]: growright,bits"    \
                 --dns-domain=place.xyz                   \
                 --community=hidden                       \
                 --snmp-options=::1:1::2                  \
                 router1                                  \
                 router2                                  \
                 router3                                  \
                 router4                                  \
                 router5                                  \
                 switch1                                  \
                 switch2                                  \
                 switch3                                  \
                 switch4                                  \
                 switch5                                  \
                 switch6                                  \
                 switch7                                  \
                 access@ppp-server.remote:::::1 > mrtg.cfg


SSSSEEEEEEEE AAAALLLLSSSSOOOO
       the reference manpage

AAAAUUUUTTTTHHHHOOOORRRR
       Tobias Oetiker <tobi@oetiker.ch> and Jakob Ilves
       <jakob.ilves@oracle.com>

LLLLIIIICCCCEEEENNNNSSSSEEEE
       GNU General Public License

CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
       Cfgmaker is Copyright 2000 by Tobias Oetiker
       <tobi@oetiker.ch>



2001-04-24                   2.9.12a                  CFGMAKER(1)
