Blame doc/cfgmaker.txt

Packit 667938
CFGMAKER(1)                          mrtg                          CFGMAKER(1)
Packit 667938
Packit 667938
Packit 667938
Packit 667938
N?NA?AM?ME?E
Packit 667938
       cfgmaker - Creates mrtg.cfg files (for mrtg-2.17.7)
Packit 667938
Packit 667938
S?SY?YN?NO?OP?PS?SI?IS?S
Packit 667938
       cfgmaker [options] [community@]router [[options] [community@]router
Packit 667938
       ...]
Packit 667938
Packit 667938
O?OP?PT?TI?IO?ON?NS?S
Packit 667938
        --ifref=nr    interface references by Interface Number (default)
Packit 667938
        --ifref=ip                     ... by Ip Address
Packit 667938
        --ifref=eth                        ... by Ethernet Number
Packit 667938
        --ifref=descr                      ... by Interface Description
Packit 667938
        --ifref=name                       ... by Interface Name
Packit 667938
        --ifref=type                       ... by Interface Type
Packit 667938
                       You may also use multiple options separated by commas,
Packit 667938
                      in which case the first available one is used:
Packit 667938
                      e.g.  --ifref=ip,name,nr
Packit 667938
Packit 667938
        --ifdesc=nr       interface description uses Interface Number (default)
Packit 667938
        --ifdesc=ip                        ... uses Ip Address
Packit 667938
        --ifdesc=eth                       ... uses Ethernet Number
Packit 667938
        --ifdesc=descr                     ... uses Interface Description
Packit 667938
        --ifdesc=name                      ... uses Interface Name
Packit 667938
        --ifdesc=catname                   ... uses CatOS Interface Name
Packit 667938
        --ifdesc=ppname                    ... uses Passport Port Name
Packit 667938
        --ifdesc=alias                     ... uses Interface Alias
Packit 667938
        --ifdesc=type                      ... uses Interface Type
Packit 667938
                       You may also use multiple options separated by commas,
Packit 667938
                      in which case the first available one is used:
Packit 667938
                      e.g.  --ifdesc=catname,ppname,descr,alias,ip,name,nr
Packit 667938
Packit 667938
        --if-filter=f     Test every interface against filter f to decide wether
Packit 667938
                          or not to include that interface into the collection.
Packit 667938
                          Currently f is being evaluated as a Perl expression
Packit 667938
                          and it's truth value is used to reject or accept the
Packit 667938
                          interface.
Packit 667938
                          (Experimental, under development, might change)
Packit 667938
Packit 667938
        --if-template=templatefile
Packit 667938
                          Replace the normal target entries for the interfaces
Packit 667938
                          with an entry as specified by the contents in the file
Packit 667938
                          templatefile.  The file is supposed to contain Perl
Packit 667938
                          code to be executed to generate the lines for the
Packit 667938
                          target in the configuration file.
Packit 667938
                          (Experimental, under development, might change)
Packit 667938
Packit 667938
        --host-template=templatefile
Packit 667938
                          In addition to creating targets for a host's interfaces
Packit 667938
                          do also create targets for the host itself as specified
Packit 667938
                          by the contents in the file templatefile.  The file is
Packit 667938
                          supposed to contain Perl code to be executed to generate
Packit 667938
                          the lines for the host related targets (such as CPU,
Packit 667938
                          ping response time measurements etc.) in the config-
Packit 667938
                          uration file.
Packit 667938
                          (Experimental, under development, might change)
Packit 667938
Packit 667938
        --global "x: a"   add global config entries
Packit 667938
Packit 667938
        --no-down         do not look at admin or opr status of interfaces
Packit 667938
Packit 667938
        --show-op-down    show interfaces which are operatively down
Packit 667938
Packit 667938
        --zero-speed=spd  use this speed in bits-per-second as the interface
Packit 667938
                          speed for all interfaces that return a speed of 0
Packit 667938
                          via ifSpeed/ifHighSpeed.  100Mbps = 100000000
Packit 667938
Packit 667938
        --subdirs=format  give each router its own subdirectory, naming each per
Packit 667938
                          "format", in which HOSTNAME and SNMPNAME will be
Packit 667938
                          replaced by the values of those items -- for instance,
Packit 667938
                          --subdirs=HOSTNAME or --subdirs="HOSTNAME (SNMPNAME)"
Packit 667938
Packit 667938
        --noreversedns    do not reverse lookup ip numbers
Packit 667938
Packit 667938
        --community=cmty  Set the default community string to "cmty" instead of
Packit 667938
                          "public".
Packit 667938
Packit 667938
        --enable-ipv6     Enable IPv6 support, if the required libraries are
Packit 667938
                          present. Numeric IPv6 addresses must be enclosed
Packit 667938
                          in square brackets, e.g. public@[2001:760:4::1]:161
Packit 667938
Packit 667938
        --use-16bit       Use 16bit SNMP request IDs to query all routers.
Packit 667938
Packit 667938
        --snmp-options=:[<port>][:[<tmout>][:[<retr>][:[<backoff>][:<ver>]]]]
Packit 667938
Packit 667938
                          Specify default SNMP options to be appended to all
Packit 667938
                          routers following.  Individual fields can be empty.
Packit 667938
                          Routers following might override some or all of the
Packit 667938
                  options given to --snmp-options.
Packit 667938
Packit 667938
        --dns-domain=domain
Packit 667938
                  Specifies a domain to append to the name of all
Packit 667938
                  routers following.
Packit 667938
Packit 667938
        --nointerfaces    Don't do generate any configuration lines for interfaces,
Packit 667938
                          skip the step of gathering interface information and
Packit 667938
                          don't run any interface template code.
Packit 667938
Packit 667938
        --interfaces      Generate configuration lines for interfaces (this is the
Packit 667938
                          default).  The main purpose of this option is to negate
Packit 667938
                          an --nointerfaces appearing earlier on the command line.
Packit 667938
Packit 667938
        --help            brief help message
Packit 667938
        --man             full documentation
Packit 667938
        --version         print the version of cfgmaker
Packit 667938
Packit 667938
        --output=file     output filename default is STDOUT
Packit 667938
Packit 667938
D?DE?ES?SC?CR?RI?IP?PT?TI?IO?ON?N
Packit 667938
       C?Cf?fg?gm?ma?ak?ke?er?r creates MRTG configuration files based on information pulled
Packit 667938
       from a router or another SNMP manageable device.
Packit 667938
Packit 667938
       [_?c_?o_?m_?m_?u_?n_?i_?t_?y@?@]_?r_?o_?u_?t_?e_?r
Packit 667938
Packit 667938
       _?C_?o_?m_?m_?u_?n_?i_?t_?y is the community name of the device you want to create a
Packit 667938
       configuration for. If not specified, it defaults to 'p?pu?ub?bl?li?ic?c'; you might
Packit 667938
       want to try this first if you do not know the community name of a
Packit 667938
       device. If you are using the wrong community name you will get no
Packit 667938
       response from the device.
Packit 667938
Packit 667938
       _?R_?o_?u_?t_?e_?r is the DNS name or the IP number of an SNMP-managable device.
Packit 667938
       Following the name you can specify 6 further options separated by
Packit 667938
       colons.  The full syntax looks like this:
Packit 667938
Packit 667938
       r?ro?ou?ut?te?er?r[:[p?pr?rt?t][:[t?tm?mo?ou?ut?t][:[r?re?et?tr?r][:[b?ba?ac?ck?ko?of?ff?f][:v?ve?er?rs?s]]]]]
Packit 667938
Packit 667938
       Of special interest may be the last parameter, v?ve?er?rs?s.  If you set this
Packit 667938
       to '2' then your device will be queried with SNMP version 2 requests.
Packit 667938
       This allows you to poll the 64 bit traffic counters in the device and
Packit 667938
       will thus work much better with fast interfaces (no more counter
Packit 667938
       overrun).  Note that the order in which the routers are specified on
Packit 667938
       the command line do matter as the same order is used when the
Packit 667938
       configuration file is generated.  The first specified router has it's
Packit 667938
       configuration lines genrated first, followed by the lines belonging to
Packit 667938
       the next router and so on.
Packit 667938
Packit 667938
       Note that the first line of the generated cfg file will contain all the
Packit 667938
       commandline options you used for generating it. This is to allow for
Packit 667938
       the easy 'regeneration' in case you want to add newhosts or make some
Packit 667938
       other global change.
Packit 667938
Packit 667938
   C?Co?on?nf?fi?ig?gu?ur?ra?at?ti?io?on?n
Packit 667938
       Except for the -?--?-o?ou?ut?tp?pu?ut?t and -?--?-g?gl?lo?ob?ba?al?l options, all options affect only
Packit 667938
       the routers following them on the command line.  If an option specified
Packit 667938
       earlier on the command line reappears later on the command line with
Packit 667938
       another value, the new value overrides the old value as far as
Packit 667938
       remaining routers are concerned.  This way options might be tailored
Packit 667938
       for groups of routers or for individual routers.
Packit 667938
Packit 667938
       See -?--?-o?ou?ut?tp?pu?ut?t and -?--?-g?gl?lo?ob?ba?al?l for how their behaviour is affected by where
Packit 667938
       or how many times they appear on the command line.
Packit 667938
Packit 667938
       See the E?Ex?xa?am?mp?pl?le?es?s below on how to set an option differently for multiple
Packit 667938
       routers.
Packit 667938
Packit 667938
       -?--?-h?he?el?lp?p
Packit 667938
           Print a brief help message and exit.
Packit 667938
Packit 667938
       -?--?-m?ma?an?n
Packit 667938
           Prints the manual page and exits.
Packit 667938
Packit 667938
       -?--?-v?ve?er?rs?si?io?on?n
Packit 667938
           Print the version of cfgmaker.  This should match the version of
Packit 667938
           MRTG for which config files are being created.
Packit 667938
Packit 667938
       -?--?-i?if?fr?re?ef?f n?nr?r|i?ip?p|e?et?th?h|d?de?es?sc?cr?r|n?na?am?me?e
Packit 667938
           Select the interface identification method.  Default is n?nr?r which
Packit 667938
           identifies the router interfaces by their number.  Unfortunately
Packit 667938
           the interface numbering scheme in an SNMP tree can change. Some
Packit 667938
           routers change their numbering when new interfaces are added,
Packit 667938
           others change thier numbering every full moon just for fun.
Packit 667938
Packit 667938
           To work around this sad problem MRTG can identify interfaces by 4
Packit 667938
           other properties. None of these works for all interfaces, but you
Packit 667938
           should be able to find one which does fine for you. Note that
Packit 667938
           especially ethernet addrsses can be problematic as some routers
Packit 667938
           have the same ethernet address on most of their interface cards.
Packit 667938
Packit 667938
           Select i?ip?p to identify the interface by its IP number. Use e?et?th?h to
Packit 667938
           use the ethernet address for identification. Use d?de?es?sc?cr?r to use the
Packit 667938
           Interface description. Or use n?na?am?me?e to use the Interface name.
Packit 667938
Packit 667938
           You can specify multiple properties if you wish, separated by
Packit 667938
           commas.  In this case, cfgmaker will use the first item in the list
Packit 667938
           which can provide unique identification.  This allows you to
Packit 667938
           specify, for example, to use IP address and to use ifName if this
Packit 667938
           is not defined:
Packit 667938
             --ifref ip,name
Packit 667938
Packit 667938
           If your chosen method does not allow unique interface
Packit 667938
           identification on the device you are querying, c?cf?fg?gm?ma?ak?ke?er?r will tell
Packit 667938
           you about it.
Packit 667938
Packit 667938
       -?--?-i?if?fd?de?es?sc?c n?nr?r|i?ip?p|e?et?th?h|d?de?es?sc?cr?r|n?na?am?me?e|t?ty?yp?pe?e|a?al?li?ia?as?s
Packit 667938
           Select what to use as the description of the interface.  The
Packit 667938
           description appears in the "Title[]" property for the target as
Packit 667938
           well as the text header in the HTML code defined in the target's
Packit 667938
           "PageTop[]".  Default is to use n?nr?r which is just the interface
Packit 667938
           number which isn't always useful to the viewer of the graphs.
Packit 667938
Packit 667938
           There are 6 other properties which could be used.  Use i?ip?p if you
Packit 667938
           want to use the interface's IP-address.  Use e?et?th?h if you want to use
Packit 667938
           the interface's ethernet address.  If you want a better
Packit 667938
           description, you can use either d?de?es?sc?cr?r, n?na?am?me?e or a?al?li?ia?as?s.  Exactly what
Packit 667938
           each of these do varies between different equipment so you might
Packit 667938
           need to experiment.  For instance, for a serial interface on a
Packit 667938
           Cisco router running IOS using n?na?am?me?e might result in "S0" being the
Packit 667938
           interface description , d?de?es?sc?cr?r might result in "Serial0" and a?al?li?ia?as?s
Packit 667938
           might result in "Link to HQ" (provided that is what is used as the
Packit 667938
           interface's "description" in the router's configuration).
Packit 667938
Packit 667938
           Finally, if you want to describe the interface by it's Btype (i.e
Packit 667938
           "ethernetCSMA", "propPointtoPoint" etc) you can use t?ty?yp?pe?e.
Packit 667938
Packit 667938
           You can specify multiple properties if you wish, separated by
Packit 667938
           commas.  In this case, cfgmaker will use the first item in the list
Packit 667938
           which is available for this interface.  This allows you to specify,
Packit 667938
           for example, to use any of the different aliases in order of
Packit 667938
           preference.
Packit 667938
Packit 667938
       -?--?-i?if?f-?-f?fi?il?lt?te?er?r 'f?fi?il?lt?te?er?r-?-e?ex?xp?pr?re?es?ss?si?io?on?n'
Packit 667938
           First of all, this is under some development and is experimental.
Packit 667938
Packit 667938
           Use this if you want to have better control over what interfaces
Packit 667938
           gets included into the configuration.  The f?fi?il?lt?te?er?r-?-e?ex?xp?pr?re?es?ss?si?io?on?n is
Packit 667938
           evaluated as a piece of Perl code and is expected to return a truth
Packit 667938
           value.  If true, include the interface and if false, exclude the
Packit 667938
           interface.
Packit 667938
Packit 667938
           For a further discussion on how these filters work, see the section
Packit 667938
           "Details on Filters" below.
Packit 667938
Packit 667938
       -?--?-i?if?f-?-t?te?em?mp?pl?la?at?te?e t?te?em?mp?pl?la?at?te?e-?-f?fi?il?le?e
Packit 667938
           First of all, this is under some development and is experimental.
Packit 667938
Packit 667938
           Use this if you want to control what the line for each target
Packit 667938
           should look like in the configuration file.  The contents of the
Packit 667938
           file t?te?em?mp?pl?la?at?te?e-?-f?fi?il?le?e will be evaluated as a Perl program which
Packit 667938
           generates the lines using certain variables for input and output.
Packit 667938
Packit 667938
           For a further discussion on how these templates work, see the
Packit 667938
           section "Details on Temaplates" below.
Packit 667938
Packit 667938
       -?--?-h?ho?os?st?t-?-t?te?em?mp?pl?la?at?te?e t?te?em?mp?pl?la?at?te?e-?-f?fi?il?le?e
Packit 667938
           First of all, this is under some development and is experimental.
Packit 667938
Packit 667938
           Use this if you want to have some extra targets related to the host
Packit 667938
           itself such as CPU utilization, ping response time to the host,
Packit 667938
           number of busy modems etc.  The contents of the file t?te?em?mp?pl?la?at?te?e-?-f?fi?il?le?e
Packit 667938
           will be evaluated once per host as a Perl program which generates
Packit 667938
           the lines using certain variables for input and output.
Packit 667938
Packit 667938
           For a further discussion on how these templates work, see the
Packit 667938
           section "Details on Templates" below.
Packit 667938
Packit 667938
       -?--?-c?co?om?mm?mu?un?ni?it?ty?y c?co?om?mm?mu?un?ni?it?ty?y-?-s?st?tr?ri?in?ng?g
Packit 667938
           Use this to set the community for the routers following on the
Packit 667938
           command line to c?co?om?mm?mu?un?ni?it?ty?y-?-s?st?tr?ri?in?ng?g.  Individual routers might
Packit 667938
           overrride this community string by using the syntax
Packit 667938
           c?co?om?mm?mu?un?ni?it?ty?y@?@r?ro?ou?ut?te?er?r.
Packit 667938
Packit 667938
       -?--?-e?en?na?ab?bl?le?e-?-i?ip?pv?v6?6
Packit 667938
           This option enables IPv6 support. It requires the appropriate perl
Packit 667938
           modules; if they are not found then IPv6 is disabled (see the ipv6
Packit 667938
           documentation).
Packit 667938
Packit 667938
           cfgmaker will use IPv6 or IPv4 depending on the target. If the
Packit 667938
           target is a numeric address, the protocol depends on the type of
Packit 667938
           address. If the target is a hostname, cfgmaker will try to resolve
Packit 667938
           the name first to an IPv6 address then to an IPv4 address.
Packit 667938
Packit 667938
           IPv6 numeric addresses must be specified between square braces.
Packit 667938
Packit 667938
           For example:
Packit 667938
Packit 667938
            cfgmaker --enable-ipv6 [2001:760:4::1]:165:::2
Packit 667938
Packit 667938
           If the target has both an IPv6 address and an IPv4 address with the
Packit 667938
           same hostname, cfgmaker first queries the target using IPv6 and
Packit 667938
           falls back to IPv4 if it fails. This is useful for targets which
Packit 667938
           don't support SNMP over IPv6.
Packit 667938
Packit 667938
       -?--?-u?us?se?e-?-1?16?6b?bi?it?t
Packit 667938
           This option forces the use of 16bit SNMP request IDs.  Some broken
Packit 667938
           SNMP agents do not accept 32bit request IDs.  Try to avoid this
Packit 667938
           option as much as possible, complain to your agent vendor instead.
Packit 667938
Packit 667938
       -?--?-s?sn?nm?mp?p-?-o?op?pt?ti?io?on?ns?s  :[p?po?or?rt?t][:[t?ti?im?me?eo?ou?ut?t][:[r?re?et?tr?ri?ie?es?s][:[b?ba?ac?ck?ko?of?ff?f][:v?ve?er?rs?si?io?on?n]]]]
Packit 667938
           Use this to set the default SNMP options for all routers following
Packit 667938
           on the command line.  Individual values might be omitted as well as
Packit 667938
           trailing colons.  Note that routers might override individual (or
Packit 667938
           all) values specified by -?--?-s?sn?nm?mp?p-?-o?op?pt?ti?io?on?ns?s by using the syntax
Packit 667938
Packit 667938
           r?ro?ou?ut?te?er?r[:[p?po?or?rt?t][:[t?ti?im?me?eo?ou?ut?t][:[r?re?et?tr?ri?ie?es?s][:[b?ba?ac?ck?ko?of?ff?f][:v?ve?er?rs?si?io?on?n]]]]]
Packit 667938
Packit 667938
       -?--?-g?gl?lo?ob?ba?al?l "?"_?b_?l_?a_?: _?a_?b_?c"?"
Packit 667938
           Use this to add global options to the generated config file.  You
Packit 667938
           can call -?--?-g?gl?lo?ob?ba?al?l several times to add multiple options.  The line
Packit 667938
           will appear in the configuration just before the config for the
Packit 667938
           next router appearing on the command line.
Packit 667938
Packit 667938
            --global "workdir: /home/mrtg"
Packit 667938
Packit 667938
           If you want some default Options you might want to put
Packit 667938
Packit 667938
            --global "options[_]: growright,bits"
Packit 667938
Packit 667938
           Specifying -?--?-g?gl?lo?ob?ba?al?l after the last router on the command line will
Packit 667938
           create a line in the configuration file which will appear after all
Packit 667938
           the routers.
Packit 667938
Packit 667938
       -?--?-n?no?or?re?ev?ve?er?rs?se?ed?dn?ns?s
Packit 667938
           Do not try to reverse lookup IP numbers ... a must for DNS free
Packit 667938
           environments.
Packit 667938
Packit 667938
       -?--?-n?no?o-?-d?do?ow?wn?n
Packit 667938
           Normally cfgmaker will not include interfaces which are marked
Packit 667938
           anything but administratively and operationally UP. With this
Packit 667938
           switch you get them all.
Packit 667938
Packit 667938
       -?--?-s?sh?ho?ow?w-?-o?op?p-?-d?do?ow?wn?n
Packit 667938
           Include interfaces which are operatively down.
Packit 667938
Packit 667938
       -?--?-z?ze?er?ro?o-?-s?sp?pe?ee?ed?d _?s_?p_?e_?e_?d
Packit 667938
           Assign this speed in bits-per-second to all interfaces which return
Packit 667938
           0 for ifSpeed and ifHighSpeed.  Some switches, notably Foundry
Packit 667938
           equipment, return a speed of zero for some interfaces.  For
Packit 667938
           example, to have all interfaces reporting zero set to 100Mbps, use
Packit 667938
           --zero-speed=100000000.
Packit 667938
Packit 667938
       -?--?-s?su?ub?bd?di?ir?rs?s _?f_?o_?r_?m_?a_?t
Packit 667938
           Give each router its own subdirectory for the HTML and graphics (or
Packit 667938
           .rrd) files.  The directory name is the given _?f_?o_?r_?m_?a_?t string with a
Packit 667938
           couple of pattern replacements.  The string "HOSTNAME" will be
Packit 667938
           replaced by the hostname of the router (however you specified it on
Packit 667938
           the c?cf?fg?gm?ma?ak?ke?er?r commandline -- it may be an actual hostname or just an
Packit 667938
           IP address), and "SNMPNAME" will be replaced with the device's idea
Packit 667938
           of its own name (the same name that appears on the right side of
Packit 667938
           the "Title" lines).  For instance, a call like:
Packit 667938
Packit 667938
            cfgmaker --subdirs=HOSTNAME__SNMPNAME public@10.10.0.18
Packit 667938
Packit 667938
           would result in the generation of lines looking something like:
Packit 667938
Packit 667938
            Directory[10.10.0.18_1]: 10.10.0.18__fp2200-bothrip-1.3
Packit 667938
Packit 667938
       -?--?-o?ou?ut?tp?pu?ut?t _?f_?i_?l_?e
Packit 667938
           Write the output from c?cf?fg?gm?ma?ak?ke?er?r into the file _?f_?i_?l_?e. The default is
Packit 667938
           to use "STDOUT". -?--?-o?ou?ut?tp?pu?ut?t is expected to appear only once on the
Packit 667938
           command line. If used multiple times, the file specified by the
Packit 667938
           last -?--?-o?ou?ut?tp?pu?ut?t will be used.
Packit 667938
Packit 667938
       -?--?-n?no?oi?in?nt?te?er?rf?fa?ac?ce?es?s
Packit 667938
           Don't generate configuration lines for interfaces.
Packit 667938
Packit 667938
           This makes cfgmaker skip all steps related to interfaces which
Packit 667938
           means it will not do any polling of the router to retrieve
Packit 667938
           interface information which speeds up the execution of cfgmaker and
Packit 667938
           it will neither run any interface templates.
Packit 667938
Packit 667938
       -?--?-i?in?nt?te?er?rf?fa?ac?ce?es?s
Packit 667938
           This makes cfgmaker generate configuration lines for interfaces
Packit 667938
           (the default behaviour).
Packit 667938
Packit 667938
           The main usage of this option is to negate an --nointerfaces
Packit 667938
           appearing earlier on the command line.
Packit 667938
Packit 667938
   S?SN?NM?MP?P V?V3?3 O?Op?pt?ti?io?on?ns?s
Packit 667938
       C?Cf?fg?gm?ma?ak?ke?er?r supports SNMP V3 using the N?Ne?et?t:?:S?SN?NM?MP?P perl module.  There are
Packit 667938
       optional parameters affecting SNMP operation.
Packit 667938
Packit 667938
       --enablesnmpv3 {yes|no}
Packit 667938
           The -?--?-e?en?na?ab?bl?le?es?sn?nm?mp?pv?v3?3 option is an optional flag to check for the
Packit 667938
           presence of the N?Ne?et?t:?::?:S?SN?NM?MP?P libraries.  C?Cf?fg?gm?ma?ak?ke?er?r will try to
Packit 667938
           determine whether this flag is required and will set the values
Packit 667938
           automatically.
Packit 667938
Packit 667938
       _?S_?N_?M_?P_?v_?3 _?A_?r_?g_?u_?m_?e_?n_?t_?s
Packit 667938
Packit 667938
       A SNMP context is a collection of management information accessible by
Packit 667938
       a SNMP entity.  An item of management information may exist in more
Packit 667938
       than one context and a SNMP entity potentially has access to many
Packit 667938
       contexts.  The combination of a contextEngineID and a contextName
Packit 667938
       unambiguously identifies a context within an administrative domain.  In
Packit 667938
       a SNMPv3 message, the contextEngineID and contextName are included as
Packit 667938
       part of the scopedPDU.  All methods that generate a SNMP message
Packit 667938
       optionally take a -?--?-c?co?on?nt?te?ex?xt?te?en?ng?gi?in?ne?ei?id?d and -?--?-c?co?on?nt?te?ex?xt?tn?na?am?me?e argument to
Packit 667938
       configure these fields.
Packit 667938
Packit 667938
       Context Engine ID
Packit 667938
           The -?--?-c?co?on?nt?te?ex?xt?te?en?ng?gi?in?ne?ei?id?d argument expects a hexadecimal string
Packit 667938
           representing the desired contextEngineID.  The string must be 10 to
Packit 667938
           64 characters (5 to 32 octets) long and can be prefixed with an
Packit 667938
           optional "0x".  Once the -?--?-c?co?on?nt?te?ex?xt?te?en?ng?gi?in?ne?ei?id?d is specified it stays
Packit 667938
           with the object until it is changed again or reset to default by
Packit 667938
           passing in the undefined value.  By default, the contextEngineID is
Packit 667938
           set to match the authoritativeEngineID of the authoritative SNMP
Packit 667938
           engine.
Packit 667938
Packit 667938
       Context Name
Packit 667938
           The contextName is passed as a string which must be 0 to 32 octets
Packit 667938
           in length using the -?--?-c?co?on?nt?te?ex?xt?tn?na?am?me?e argument.  The contextName stays
Packit 667938
           with the object until it is changed.  The contextName defaults to
Packit 667938
           an empty string which represents the "default" context.
Packit 667938
Packit 667938
       _?U_?s_?e_?r_?-_?b_?a_?s_?e_?d _?S_?e_?c_?u_?r_?i_?t_?y _?M_?o_?d_?e_?l _?A_?r_?g_?u_?m_?e_?n_?t_?s
Packit 667938
Packit 667938
       The User-based Security Model (USM) used by SNMPv3 requires that a
Packit 667938
       securityName be specified using the -?--?-u?us?se?er?rn?na?am?me?e argument.  The creation
Packit 667938
       of a Net::SNMP object with the version set to SNMPv3 will fail if the
Packit 667938
       -?--?-u?us?se?er?rn?na?am?me?e argument is not present.  The -?--?-u?us?se?er?rn?na?am?me?e argument expects a
Packit 667938
       string 1 to 32 octets in length.
Packit 667938
Packit 667938
       Different levels of security are allowed by the User-based Security
Packit 667938
       Model which address authentication and privacy concerns.  A SNMPv3
Packit 667938
       target will derive the security level (securityLevel) based on which of
Packit 667938
       the following arguments are specified.
Packit 667938
Packit 667938
       By default a securityLevel of 'noAuthNoPriv' is assumed.  If the
Packit 667938
       -?--?-a?au?ut?th?hk?ke?ey?y or -?--?-a?au?ut?th?hp?pa?as?ss?sw?wo?or?rd?d arguments are specified, the securityLevel
Packit 667938
       becomes 'authNoPriv'.  The -?--?-a?au?ut?th?hp?pa?as?ss?sw?wo?or?rd?d argument expects a string
Packit 667938
       which is at least 1 octet in length.  Optionally, the -?--?-a?au?ut?th?hk?ke?ey?y
Packit 667938
       argument can be used so that a plain text password does not have to be
Packit 667938
       specified in a script.  The -?--?-a?au?ut?th?hk?ke?ey?y argument expects a hexadecimal
Packit 667938
       string produced by localizing the password with the
Packit 667938
       authoritativeEngineID for the specific destination device.  The
Packit 667938
       "snmpkey" utility included with the Net::SNMP  distribution can be used
Packit 667938
       to create the hexadecimal string (see snmpkey).
Packit 667938
Packit 667938
       Two different hash algorithms are defined by SNMPv3 which can be used
Packit 667938
       by the Security Model for authentication.  These algorithms are
Packit 667938
       HMAC-MD5-96 "MD5" (RFC 1321) and HMAC-SHA-96 "SHA-1" (NIST FIPS PUB
Packit 667938
       180-1).   The default algorithm used by the module is HMAC-MD5-96.
Packit 667938
       This behavior can be changed by using the -?--?-a?au?ut?th?hp?pr?ro?ot?to?oc?co?ol?l argument.
Packit 667938
       This argument expects either the string 'md5' or 'sha' to be passed to
Packit 667938
       modify the hash algorithm.
Packit 667938
Packit 667938
       By specifying the arguments -?--?-p?pr?ri?iv?vk?ke?ey?y or -?--?-p?pr?ri?iv?vp?pa?as?ss?sw?wo?or?rd?d the
Packit 667938
       securityLevel associated with the object becomes 'authPriv'.  According
Packit 667938
       to SNMPv3, privacy requires the use of authentication.  Therefore, if
Packit 667938
       either of these two arguments are present and the -?--?-a?au?ut?th?hk?ke?ey?y or
Packit 667938
       -?--?-a?au?ut?th?hp?pa?as?ss?sw?wo?or?rd?d arguments are missing, the creation of the object fails.
Packit 667938
       The -?--?-p?pr?ri?iv?vk?ke?ey?y and -?--?-p?pr?ri?iv?vp?pa?as?ss?sw?wo?or?rd?d arguments expect the same input as the
Packit 667938
       -?--?-a?au?ut?th?hk?ke?ey?y and -?--?-a?au?ut?th?hp?pa?as?ss?sw?wo?or?rd?d arguments respectively.
Packit 667938
Packit 667938
       The User-based Security Model described in RFC 3414 defines a single
Packit 667938
       encryption protocol to be used for privacy.  This protocol, CBC-DES
Packit 667938
       "DES" (NIST FIPS PUB 46-1), is used by default or if the string 'des'
Packit 667938
       is passed to the -?--?-p?pr?ri?iv?vp?pr?ro?ot?to?oc?co?ol?l argument.  By working with the Extended
Packit 667938
       Security Options Consortium http://www.snmp.com/eso/, the module also
Packit 667938
       supports additional protocols which have been defined in draft
Packit 667938
       specifications.  The draft
Packit 667938
       http://www.snmp.com/eso/draft-reeder-snmpv3-usm-3desede-00.txt defines
Packit 667938
       the support of CBC-3DES-EDE "Triple-DES" (NIST FIPS 46-3) in the User-
Packit 667938
       based Security Model.  This protocol can be selected using the
Packit 667938
       -?--?-p?pr?ri?iv?vp?pr?ro?ot?to?oc?co?ol?l argument with the string '3desede'.  The draft
Packit 667938
       http://www.snmp.com/eso/draft-blumenthal-aes-usm-04.txt describes the
Packit 667938
       use of CFB128-AES-128/192/256 "AES" (NIST FIPS PUB 197) in the USM. The
Packit 667938
       three AES encryption protocols, differentiated by their key sizes, can
Packit 667938
       be selected by passing 'aescfb128', 'aescfb192', or 'aescfb256' to the
Packit 667938
       -?-p?pr?ri?iv?vp?pr?ro?ot?to?oc?co?ol?l argument.
Packit 667938
Packit 667938
   D?De?et?ta?ai?il?ls?s o?on?n F?Fi?il?lt?te?er?rs?s
Packit 667938
       The purpose of the filters is to decide which interfaces to accept and
Packit 667938
       which interfaces to reject.  This decision is done for each interface
Packit 667938
       by evaluating the filter expression as a piece of Perl code and
Packit 667938
       investigating the result of the evaluation.  If true, accept the
Packit 667938
       interface otherwise reject it.
Packit 667938
Packit 667938
       When working with filters, remember that Perl has it's own idea of what
Packit 667938
       truth and false is.  The empty string "" and the string "0" are false,
Packit 667938
       all other strings are true.  This further imples that any integer value
Packit 667938
       of 0 is false as well as any undef value.  It also implies that all
Packit 667938
       references are considered true.
Packit 667938
Packit 667938
       As the filter is evaluated as a Perl expression, several useful
Packit 667938
       constructs in Perl are worth mentioning:
Packit 667938
Packit 667938
       Expressions might be grouped by using parentheses "()".  Expressions
Packit 667938
       might be combined using boolean operators such as the following:
Packit 667938
Packit 667938
       "a?an?nd?d" (equivalent with "&?&&?&")
Packit 667938
           Boolean "and" of the two expressions, is only true if both
Packit 667938
           expressions are true.  Example: _?e_?x_?p_?r_?e_?s_?s_?i_?o_?n_?1 a?an?nd?d _?e_?x_?p_?r_?e_?s_?s_?i_?o_?n_?2
Packit 667938
Packit 667938
       "o?or?r" (equivalent with "|?||?|")
Packit 667938
           Boolean "or" of the two expressions, is true if either or both
Packit 667938
           expressions are true.  Example: _?e_?x_?p_?r_?e_?s_?s_?i_?o_?n_?1 o?or?r _?e_?x_?p_?r_?e_?s_?s_?i_?o_?n_?2
Packit 667938
Packit 667938
       "n?no?ot?t" (equivalent with "!?!")
Packit 667938
           Boolean negation of a single expression.  Example:  n?no?ot?t _?e_?x_?p_?r_?e_?s_?s_?i_?o_?n
Packit 667938
           .  Yet another example: !?!_?e_?x_?p_?r_?e_?s_?s_?i_?o_?n
Packit 667938
Packit 667938
       (For more details on this I recommend a book on Perl)
Packit 667938
Packit 667938
       _?P_?r_?e_?d_?e_?f_?i_?n_?e_?d _?F_?i_?l_?t_?e_?r _?V_?a_?r_?i_?a_?b_?l_?e_?s
Packit 667938
Packit 667938
       To facilitate, there are a number of predefined values available to use
Packit 667938
       in the filter.  Note that these variables are also available when
Packit 667938
       templates interfaces are evaluated (but not host templates).
Packit 667938
Packit 667938
       Caveat:  All these variables' names begin with a dollar sign  ($),
Packit 667938
       which is a syntactic requirement for scalar variables in Perl.  The
Packit 667938
       danger here is that the dollar sign in many shells is an active
Packit 667938
       character (often used for shell variables exactly as in Perl variables)
Packit 667938
       so it is important to ensure that the Perl expression isn't evaluated
Packit 667938
       by the command line shell as shell code before being passed to cfgmaker
Packit 667938
       as command line arguments.  In shells like Bourne shell, ksh shell or
Packit 667938
       bash shell, placing the entire expression within single qoutes will
Packit 667938
       avoid such accidental evaluation:
Packit 667938
Packit 667938
        '--if-filter=($default_iftype && $if_admin)'
Packit 667938
Packit 667938
       $?$i?if?f_?_t?ty?yp?pe?e
Packit 667938
           This is an integer specifying the interface type as per the SNMP
Packit 667938
           standards and as reported by the polled device.  A complete list of
Packit 667938
           interface types would be impractical for this document , but there
Packit 667938
           are a number predefined varables below.  Normally, cfgmaker puts in
Packit 667938
           the target's PageTop this iftype value within paranthesis after the
Packit 667938
           name of the interface type. (e.g "propPointToPointSerial (22)").
Packit 667938
Packit 667938
           Here's a list of some of the most common interface types by number:
Packit 667938
Packit 667938
              6 ethernetCsmacd
Packit 667938
              7 iso88023Csmacd
Packit 667938
              9 iso88025TokenRing
Packit 667938
             15 fddi
Packit 667938
             19 E1
Packit 667938
             20 basicISDN
Packit 667938
             21 primaryISDN
Packit 667938
             22 propPointToPointSerial
Packit 667938
             23 ppp
Packit 667938
             24 softwareLoopback
Packit 667938
             30 ds3
Packit 667938
             32 frame-relay
Packit 667938
             33 rs232
Packit 667938
             37 atm
Packit 667938
             39 sonet
Packit 667938
             44 frameRelayService
Packit 667938
             46 hssi
Packit 667938
             49 aal5
Packit 667938
             53 propVirtual
Packit 667938
             62 Fast Ethernet (100BaseT)
Packit 667938
             63 ISDN & X.25
Packit 667938
             69 Full Duplex Fast Ethernet (100BaseFX)
Packit 667938
             94 Asymetric Digital Subscriber Loop (ADSL)
Packit 667938
            117 Gigabit Ethernet
Packit 667938
            134 ATM Sub Interface
Packit 667938
Packit 667938
       $?$d?de?ef?fa?au?ul?lt?t
Packit 667938
           True if and only if cfgmaker normally should accepted the interface
Packit 667938
           based on the interfaces administrative and operational state
Packit 667938
           (taking the flags -?--?-n?no?o-?-d?do?ow?wn?n and -?--?-s?sh?ho?ow?w-?-o?op?p-?-d?do?ow?wn?n into account) and
Packit 667938
           it's type (and a few other things).
Packit 667938
Packit 667938
       $?$d?de?ef?fa?au?ul?lt?t_?_i?if?fs?st?ta?at?te?e
Packit 667938
           True if and only if cfgmaker would have accepted the interface
Packit 667938
           based on it's operational and administrative states (also taking
Packit 667938
           into account the presence of the flags -?--?-n?no?o-?-d?do?ow?wn?n and
Packit 667938
           -?--?-s?sh?ho?ow?w-?-o?op?p-?-d?do?ow?wn?n).
Packit 667938
Packit 667938
       $?$d?de?ef?fa?au?ul?lt?t_?_i?if?ft?ty?yp?pe?e
Packit 667938
           True if and only if cfgmaker would have accepted the interface
Packit 667938
           based on it's type (and a few type specific details in addition).
Packit 667938
Packit 667938
       $?$i?if?f_?_a?ad?dm?mi?in?n
Packit 667938
           True if and only if the interface is in an adminstrative up state.
Packit 667938
Packit 667938
       $?$i?if?f_?_o?op?pe?er?r
Packit 667938
           True if and only if the interface is in an operational up state.
Packit 667938
Packit 667938
       A number of variables are also predefined to easily decide if an
Packit 667938
       interface belong to a certain cathegory or not.  Below is all those
Packit 667938
       variables listed together with which if_type numbers each variable will
Packit 667938
       be true for.  Note that some variables refer to other variables as
Packit 667938
       well.
Packit 667938
Packit 667938
       $?$i?if?f_?_i?is?s_?_e?et?th?he?er?rn?ne?et?t
Packit 667938
           True for ethernet interfaces (nr 6, 7, 26, 62, 69 and 117).
Packit 667938
Packit 667938
       $?$i?if?f_?_i?is?s_?_i?is?sd?dn?n
Packit 667938
           True for various ISDN interface types (nr 20, 21, 63, 75, 76 and
Packit 667938
           77)
Packit 667938
Packit 667938
       $?$i?if?f_?_i?is?s_?_d?di?ia?al?lu?up?p
Packit 667938
           True for dial-up interfaces such as PPP as well as ISDN.  (nr 23,
Packit 667938
           81, 82 and 108 in addition to the numbers of $?$i?if?f_?_i?is?s_?_i?is?sd?dn?n).
Packit 667938
Packit 667938
       $?$i?if?f_?_i?is?s_?_a?at?tm?m
Packit 667938
           True for miscellaneous ATM related interface types (nr 37, 49, 107,
Packit 667938
           105, 106, 114 and 134).
Packit 667938
Packit 667938
       $?$i?if?f_?_i?is?s_?_w?wa?an?n
Packit 667938
           True for WAN interfaces point to point, Frame Relay and High Speed
Packit 667938
           Serial ( 22,32,44,46)
Packit 667938
Packit 667938
       $?$i?if?f_?_i?is?s_?_l?la?an?n
Packit 667938
           True for LAN interfaces (8, 9, 11, 15, 26, 55, 59, 60 and 115 in
Packit 667938
           addition to the numbers of $?$i?if?f_?_i?is?s_?_e?et?th?he?er?rn?ne?et?t).
Packit 667938
Packit 667938
       $?$i?if?f_?_i?is?s_?_d?ds?sl?l
Packit 667938
           True for ADSL, RDSL, HDSL and SDSL (nr 94, 95, 96, 97)
Packit 667938
Packit 667938
       $?$i?if?f_?_i?is?s_?_l?lo?oo?op?pb?ba?ac?ck?k
Packit 667938
           True for software loopback interfaces (nr 24)
Packit 667938
Packit 667938
       $?$i?if?f_?_i?is?s_?_c?ci?is?sc?co?ov?vl?la?an?n
Packit 667938
           True for Cisco VLAN interfaces (interfaces with the word Vlan or
Packit 667938
           VLAN in their ifdescs)
Packit 667938
Packit 667938
       $?$i?if?f_?_v?vl?la?an?n_?_i?id?d
Packit 667938
           Returns the vlan id associated with a specific port on Cisco
Packit 667938
           Catalyst switches under both Catalyst OS and IOS, and 3Com
Packit 667938
           switches.  If it is not a vlan interface, will return undef.
Packit 667938
Packit 667938
       $?$i?if?f_?_c?ci?is?sc?co?o_?_t?tr?ru?un?nk?k
Packit 667938
           Returns the trunking state of a specific port on Cisco Catalyst
Packit 667938
           switches under both Catalyst OS and IOS.  Returns "1" if the
Packit 667938
           interface is a trunk, undef otherwise.
Packit 667938
Packit 667938
       $?$i?if?f_?_M?MT?TU?U
Packit 667938
           Returns the Maximum Transfer Unit associated with a specific port.
Packit 667938
Packit 667938
       Besides that, you can also use the variables defined for templates
Packit 667938
       below.  Further, all the variables available in cfgmaker is at the
Packit 667938
       scripts disposal even if the use of such features is discouraged.  More
Packit 667938
       "shortcuts" in the form of variables and functions will be made
Packit 667938
       available in the future instead.
Packit 667938
Packit 667938
       _?E_?x_?a_?m_?p_?l_?e_?s _?o_?n _?F_?i_?l_?t_?e_?r_?s
Packit 667938
Packit 667938
       The following filter will not affect which interfaces get's included or
Packit 667938
       excluded, it will make cfgmaker behave as normally.
Packit 667938
Packit 667938
        '--if-filter=$default'
Packit 667938
Packit 667938
       The following filter will make cfgmaker exclude PPP (23) interfaces:
Packit 667938
Packit 667938
        '--if-filter=$default && $if_type!=23'
Packit 667938
Packit 667938
       The following filter will make cfgmaker behave as usual except that it
Packit 667938
       will consider the operational state of an interface irrelevant but
Packit 667938
       still reject all interfaces which are administratively down.
Packit 667938
Packit 667938
        '--if-filter=$if_admin && $default_iftype'
Packit 667938
Packit 667938
   D?De?et?ta?ai?il?ls?s o?on?n T?Te?em?mp?pl?la?at?te?es?s
Packit 667938
       The contents of the template files are evaluated as a Perl program.  A
Packit 667938
       number or Perl variables are available for the program to read and
Packit 667938
       others are used to be written to.
Packit 667938
Packit 667938
       As quite a few of the predefined variables has values which are are
Packit 667938
       supposed to be used in HTML code some of them have an "HTML-escaped"
Packit 667938
       variant, e.g $html_syslocation is the HTML escaped variant of
Packit 667938
       $syslocation.  The HTML escaping means that the chars "<", ">" and "&"
Packit 667938
       are replaced by "<", ">" and "&" and that newlines embedded
Packit 667938
       in the string are prepended with "
" and appended with a space
Packit 667938
       character (if a newline is last in the string it is not touched).
Packit 667938
Packit 667938
       _?W_?r_?i_?t_?a_?b_?l_?e _?T_?e_?m_?p_?l_?a_?t_?e _?V_?a_?r_?i_?a_?b_?l_?e_?s
Packit 667938
Packit 667938
       These are the variables available to store the configuration lines in.
Packit 667938
       Some of them are initialized prior to the evaluation of the template
Packit 667938
       but such content normally is comments for inclusion in the final
Packit 667938
       configuration file so those variables might be reset to the empty
Packit 667938
       string in the template code to eliminate the comments.  The other way
Packit 667938
       around is also possible, the contents of these variables might be
Packit 667938
       extended with further information for various reasons such as debugging
Packit 667938
       etc.
Packit 667938
Packit 667938
       Once the template has been evaluated, the following happens:  if the
Packit 667938
       template is a interface template and the actual interface for some
Packit 667938
       reason is rejected and thus needs to be commented out, all the lines in
Packit 667938
       the variable $?$t?ta?ar?rg?ge?et?t_?_l?li?in?ne?es?s are turned into comments by adding a hash
Packit 667938
       mark ("#") at their beginning.  Then all the variables $?$h?he?ea?ad?d_?_l?li?in?ne?es?s,
Packit 667938
       $?$p?pr?ro?ob?bl?le?em?m_?_l?li?in?ne?es?s , $?$t?ta?ar?rg?ge?et?t_?_l?li?in?ne?es?s and $?$s?se?ep?pa?ar?ra?at?to?or?r_?_l?li?in?ne?es?s are concatenated
Packit 667938
       together to form the lines to add to the configuration file.
Packit 667938
Packit 667938
       $?$t?ta?ar?rg?ge?et?t_?_l?li?in?ne?es?s
Packit 667938
           This variable is the placeholder for the configuration lines
Packit 667938
           created by the template.  $?$t?ta?ar?rg?ge?et?t_?_l?li?in?ne?es?s is predefined to be empty
Packit 667938
           when the template code is evaluated.
Packit 667938
Packit 667938
       $?$h?he?ea?ad?d_?_l?li?in?ne?es?s
Packit 667938
           This variable is intended to be the placeholder for the comment
Packit 667938
           line appearing just before the target in the configuration file.
Packit 667938
           It is initialized with that comment line before the evaluation of
Packit 667938
           the template code and if the template doesn't modify $?$h?he?ea?ad?d_?_l?li?in?ne?es?s
Packit 667938
           during evaluation, the comment will look like usual in the config
Packit 667938
           file.
Packit 667938
Packit 667938
       $?$p?pr?ro?ob?bl?le?em?m_?_l?li?in?ne?es?s
Packit 667938
           This variable is intended to be the placholder for the comment
Packit 667938
           lines describing any problems which might have been encountered
Packit 667938
           when trying to add the target into the configuration.  For host
Packit 667938
           templates it's normally not used and for those it's predefined as
Packit 667938
           the empty string.  For interface templates $?$p?pr?ro?ob?bl?le?em?m_?_l?li?in?ne?es?s is
Packit 667938
           predefined with the error description comments which cfgmaker
Packit 667938
           normally would use for rejected interfaces or as the empty string
Packit 667938
           for accepted interfaces.
Packit 667938
Packit 667938
           It is possible to test against $?$p?pr?ro?ob?bl?le?em?m_?_l?li?in?ne?es?s to find out if an
Packit 667938
           interface will be included or rejected but this is not recommended.
Packit 667938
           Test against $?$i?if?f_?_o?ok?k instead.
Packit 667938
Packit 667938
       $?$s?se?ep?pa?ar?ra?at?to?or?r_?_l?li?in?ne?es?s
Packit 667938
           This variable is the placeholder for the string to use as the
Packit 667938
           separator between the code for individual targets.  The contents of
Packit 667938
           this variable is put after each target (so the lines will appear
Packit 667938
           after the end of the last target in the config as well).
Packit 667938
Packit 667938
       _?P_?r_?e_?d_?e_?f_?i_?n_?e_?d _?T_?e_?m_?p_?l_?a_?t_?e _?V_?a_?r_?i_?a_?b_?l_?e_?s
Packit 667938
Packit 667938
       All the variables below are available for interface templates to use.
Packit 667938
       For host templates, only those listed under "Host and System Variables"
Packit 667938
       are available.
Packit 667938
Packit 667938
       For interface templates the variables listed under "Predefined Filter
Packit 667938
       Variables" are also available.
Packit 667938
Packit 667938
       _?H_?o_?s_?t _?a_?n_?d _?S_?y_?s_?t_?e_?m _?V_?a_?r_?i_?a_?b_?l_?e_?s
Packit 667938
Packit 667938
       $?$r?ro?ou?ut?te?er?r_?_n?na?am?me?e
Packit 667938
           This is the fully qualified name for the router.  It is affected by
Packit 667938
           the following items on the command line:  the router name itself
Packit 667938
           and -?--?-d?dn?ns?s-?-d?do?om?ma?ai?in?n.
Packit 667938
Packit 667938
       $?$r?ro?ou?ut?te?er?r_?_c?co?on?nn?ne?ec?ct?t
Packit 667938
           This is the reference string for the router being polled.  It is on
Packit 667938
           the form community@router possibly followed by some snmp options.
Packit 667938
           It is affected by the following items on the command line:  the
Packit 667938
           router name itself, -?--?-c?co?om?mm?mu?un?ni?it?ty?y, -?--?-s?sn?nm?mp?p-?-o?op?pt?ti?io?on?ns?s and -?--?-d?dn?ns?s-?-d?do?om?ma?ai?in?n.
Packit 667938
           (There's no HTML escaped variant available)
Packit 667938
Packit 667938
       $?$d?di?ir?re?ec?ct?to?or?ry?y_?_n?na?am?me?e
Packit 667938
           This variable should contain the directory name as cfgmaker
Packit 667938
           normally would use as the value for the "Directory[]" directive.
Packit 667938
           The value is determined by the -?--?-s?su?ub?bd?di?ir?rs?s command line option.  If
Packit 667938
           -?--?-s?su?ub?bd?di?ir?rs?s isn't specified $?$d?di?ir?re?ec?ct?to?or?ry?y_?_n?na?am?me?e will be the empty string.
Packit 667938
           (There's no HTML escaped variant available)
Packit 667938
Packit 667938
       $?$s?sy?ys?sc?co?on?nt?ta?ac?ct?t
Packit 667938
           This variable is the router's SNMP sysContact value.  (HTML escaped
Packit 667938
           variant: $?$h?ht?tm?ml?l_?_s?sy?ys?sc?co?on?nt?ta?ac?ct?t)
Packit 667938
Packit 667938
       $?$s?sy?ys?sn?na?am?me?e
Packit 667938
           This variable is the router's SNMP sysName value.  (No HTML escaped
Packit 667938
           variant available)
Packit 667938
Packit 667938
       $?$s?sy?ys?sl?lo?oc?ca?at?ti?io?on?n
Packit 667938
           This variable is the router's SNMP sysLocation value.  (HTML
Packit 667938
           escaped variant: $?$h?ht?tm?ml?l_?_s?sy?ys?sl?lo?oc?ca?at?ti?io?on?n)
Packit 667938
Packit 667938
       $?$s?sy?ys?sd?de?es?sc?cr?r
Packit 667938
           This variable is the router's SNMP sysDescr value.  It is normally
Packit 667938
           not used by cfgmaker but might be useful in a template.  (HTML
Packit 667938
           escaped variant: $?$h?ht?tm?ml?l_?_s?sy?ys?sd?de?es?sc?cr?r)
Packit 667938
Packit 667938
       _?I_?n_?t_?e_?r_?f_?a_?c_?e _?T_?a_?r_?g_?e_?t _?R_?e_?l_?a_?t_?e_?d _?V_?a_?r_?i_?a_?b_?l_?e_?s
Packit 667938
Packit 667938
       $?$t?ta?ar?rg?ge?et?t_?_n?na?am?me?e
Packit 667938
           This is what cfgmaker normally would use as the the name of the
Packit 667938
           target.  The target name is what is found within the square
Packit 667938
           brackets, "[]", for target directives.  (There's no HTML escaped
Packit 667938
           variant available)
Packit 667938
Packit 667938
       $?$i?if?f_?_r?re?ef?f
Packit 667938
           This the reference string for the interface.  It is expected to be
Packit 667938
           used in the "Target[xyz]" directive to distinguish what interface
Packit 667938
           to use.  The value of this variable is affected by the -?--?-i?if?fr?re?ef?f
Packit 667938
           command line option.  It is normally used together with
Packit 667938
           $?$r?ro?ou?ut?te?er?r_?_c?co?on?nn?ne?ec?ct?t.  (There's no HTML escaped variant available)
Packit 667938
Packit 667938
       $?$i?if?f_?_o?ok?k
Packit 667938
           This variable is true if the interface is going to be included into
Packit 667938
           the configuration file, otherwise false.  Don't test against other
Packit 667938
           variables such as $?$p?pr?ro?ob?bl?le?em?m_?_l?li?in?ne?es?s to find out if an interface will
Packit 667938
           be rejected or not, use this $?$i?if?f_?_o?ok?k instead.
Packit 667938
Packit 667938
       $?$d?de?ef?fa?au?ul?lt?t_?_t?ta?ar?rg?ge?et?t_?_l?li?in?ne?es?s
Packit 667938
           This variable contains all the target lines which cfgmaker by
Packit 667938
           default outputs for this interface.  It's useful if you want to
Packit 667938
           have the "standard target" but want to add some extra lines to it
Packit 667938
           by using a template.
Packit 667938
Packit 667938
       By default cfgmaker uses the following directives for each target it
Packit 667938
       generates: Target[], SetEnv[], MaxBytes[], Title[], PageTop[] and if
Packit 667938
       there is any directory specified also the Directory[] directive.
Packit 667938
Packit 667938
       To facilitate the creation of templates which generates target configs
Packit 667938
       which are similar to the default one, each of the above mentioned
Packit 667938
       directive lines have a corresponding variable containing the line as
Packit 667938
       cfgmaker would have output it by default.
Packit 667938
Packit 667938
       Note that none of these have a HTML escaped variant, text in them is
Packit 667938
       HTML escaped where needed.  Also note that they do not have any newline
Packit 667938
       at the end.
Packit 667938
Packit 667938
       $?$d?de?ef?fa?au?ul?lt?t_?_t?ta?ar?rg?ge?et?t_?_d?di?ir?re?ec?ct?ti?iv?ve?e
Packit 667938
           This variable contains the default string for the Target[]
Packit 667938
           directive line.
Packit 667938
Packit 667938
       $?$d?de?ef?fa?au?ul?lt?t_?_s?se?et?te?en?nv?v_?_d?di?ir?re?ec?ct?ti?iv?ve?e
Packit 667938
           This variable contains the default string for the SetEnv[]
Packit 667938
           directive line.
Packit 667938
Packit 667938
       $?$d?de?ef?fa?au?ul?lt?t_?_d?di?ir?re?ec?ct?to?or?ry?y_?_d?di?ir?re?ec?ct?ti?iv?ve?e
Packit 667938
           This variable contains the default string for the Directory[]
Packit 667938
           directive line which means it is an empty string (with no newline)
Packit 667938
           if there's no directory.
Packit 667938
Packit 667938
       $?$d?de?ef?fa?au?ul?lt?t_?_m?ma?ax?xb?by?yt?te?es?s_?_d?di?ir?re?ec?ct?ti?iv?ve?e
Packit 667938
           This variable contains the default string for the MaxBytes[]
Packit 667938
           directive line.
Packit 667938
Packit 667938
       $?$d?de?ef?fa?au?ul?lt?t_?_t?ti?it?tl?le?e_?_d?di?ir?re?ec?ct?ti?iv?ve?e
Packit 667938
           This variable contains the default string for the Title[] directive
Packit 667938
           line.
Packit 667938
Packit 667938
       $?$d?de?ef?fa?au?ul?lt?t_?_p?pa?ag?ge?et?to?op?p_?_d?di?ir?re?ec?ct?ti?iv?ve?e
Packit 667938
           This variable contains the default string for the PageTop[]
Packit 667938
           directive lines.
Packit 667938
Packit 667938
       _?I_?n_?t_?e_?r_?f_?a_?c_?e _?N_?e_?t_?w_?o_?r_?k _?C_?o_?n_?f_?i_?g_?u_?r_?a_?t_?i_?o_?n _?V_?a_?r_?i_?a_?b_?l_?e_?s
Packit 667938
Packit 667938
       $?$i?if?f_?_i?ip?p
Packit 667938
           This variable should contain the IP-address of the interface, if
Packit 667938
           any has been assigned to it.  (There's no HTML escaped variant
Packit 667938
           available)
Packit 667938
Packit 667938
       $?$i?if?fi?in?nd?de?ex?x
Packit 667938
           This variable is the SNMP ifIndex for the interface which per
Packit 667938
           definition always is an integer.  (There's no HTML escaped variant
Packit 667938
           available)
Packit 667938
Packit 667938
       $?$i?if?f_?_i?in?nd?de?ex?x
Packit 667938
           Equivalent with $?$i?if?fi?in?nd?de?ex?x.
Packit 667938
Packit 667938
       $?$i?if?f_?_e?et?th?h
Packit 667938
           Contains the ethernet address of the interface, if any.  (There's
Packit 667938
           no HTML escaped variant available)
Packit 667938
Packit 667938
       $?$i?if?f_?_s?sp?pe?ee?ed?d
Packit 667938
           This variable is the speed in bytes/second (with prefixes).
Packit 667938
           (There's no HTML escaped variant available)
Packit 667938
Packit 667938
       $?$i?if?f_?_s?sp?pe?ee?ed?d_?_s?st?tr?r
Packit 667938
           This variable is a cooked speed description which is either in bits
Packit 667938
           or bytes depending on wether or not the bits option is active and
Packit 667938
           also with the proper prefix for the speed (k, M, G etc).  (No HTML
Packit 667938
           escaped variant available)
Packit 667938
Packit 667938
       $?$i?if?f_?_t?ty?yp?pe?e_?_d?de?es?sc?c
Packit 667938
           This variable is a textual description of the interface type.
Packit 667938
           (HTML escaped variant: $?$h?ht?tm?ml?l_?_i?if?f_?_t?ty?yp?pe?e_?_d?de?es?sc?c)
Packit 667938
Packit 667938
       $?$i?if?f_?_t?ty?yp?pe?e_?_n?nu?um?m
Packit 667938
           This variable the integer value corresponding to the interface type
Packit 667938
           (for a listing for the value for the more common interface types,
Packit 667938
           see the section DETAILS ON FILTERS above).  (No HTML escaped
Packit 667938
           variant available)
Packit 667938
Packit 667938
       $?$i?if?f_?_d?dn?ns?s_?_n?na?am?me?e
Packit 667938
           This is the DNS name for the interface.  (No HTML escaped variant
Packit 667938
           available)
Packit 667938
Packit 667938
       _?I_?n_?t_?e_?r_?f_?a_?c_?e _?N_?a_?m_?e_?, _?D_?e_?s_?c_?r_?i_?p_?t_?i_?o_?n _?a_?n_?d _?A_?l_?i_?a_?s _?V_?a_?r_?i_?a_?b_?l_?e_?s
Packit 667938
Packit 667938
       It might seem confusing with both _?N_?a_?m_?e, _?D_?e_?s_?c_?r_?i_?p_?t_?i_?o_?n and _?A_?l_?i_?a_?s in this
Packit 667938
       context and to some extent it is.  _?N_?a_?m_?e and _?D_?e_?s_?c_?r_?i_?p_?t_?i_?o_?n are usually
Packit 667938
       supported on most equipment but how they are used varies, both between
Packit 667938
       manufacturers as well as between different cathegories of equipment
Packit 667938
       from the same manufacturer.  The _?A_?l_?i_?a_?s is at least supported by Cisco
Packit 667938
       IOS, and that variable contains whatever is used in the IOS statement
Packit 667938
       called "description" for the interface (not to be confused with the
Packit 667938
       SNMP variables for _?D_?e_?s_?c_?r_?i_?p_?t_?i_?o_?n).
Packit 667938
Packit 667938
       For better control from the command line consider $?$i?if?f_?_t?ti?it?tl?le?e_?_d?de?es?sc?c which
Packit 667938
       contents are controlled by the -?--?-i?if?f-?-d?de?es?sc?cr?r command line option.
Packit 667938
Packit 667938
       $?$i?if?f_?_s?sn?nm?mp?p_?_d?de?es?sc?cr?r
Packit 667938
           This variable should contain the "raw" description of the interface
Packit 667938
           as determined by the SNMP polling of the router.  (HTML escaped
Packit 667938
           variant: $?$h?ht?tm?ml?l_?_i?if?f_?_s?sn?nm?mp?p_?_d?de?es?sc?cr?r)
Packit 667938
Packit 667938
       $?$i?if?f_?_s?sn?nm?mp?p_?_n?na?am?me?e
Packit 667938
           The "raw" name for the interface as provided by SNMP polling.
Packit 667938
           (HTML escaped variant: $?$h?ht?tm?ml?l_?_i?if?f_?_s?sn?nm?mp?p_?_n?na?am?me?e)
Packit 667938
Packit 667938
       $?$i?if?f_?_s?sn?nm?mp?p_?_a?al?li?ia?as?s
Packit 667938
           The "raw" ifAlias for the interface as provided by SNMP polling.
Packit 667938
           (HTML escaped variant: $?$h?ht?tm?ml?l_?_i?if?f_?_s?sn?nm?mp?p_?_a?al?li?ia?as?s)
Packit 667938
Packit 667938
       $?$i?if?f_?_c?ci?is?sc?co?o_?_d?de?es?sc?cr?r
Packit 667938
           The "raw" CiscolocIfDescr for the interface as provided by SNMP
Packit 667938
           polling.  (HTML escaped variant: $?$h?ht?tm?ml?l_?_i?if?f_?_c?ci?is?sc?co?o_?_d?de?es?sc?cr?r)
Packit 667938
Packit 667938
       $?$i?if?f_?_d?de?es?sc?cr?ri?ip?pt?ti?io?on?n
Packit 667938
           This is the "cooked" description string for the interface, taking
Packit 667938
           into account the SNMP values found for the interface's RDescr,
Packit 667938
           ifAlias and CiscolocIfDescr.  (HTML escaped variant:
Packit 667938
           $?$h?ht?tm?ml?l_?_i?if?f_?_d?de?es?sc?cr?ri?ip?pt?ti?io?on?n)
Packit 667938
Packit 667938
       $?$i?if?f_?_t?ti?it?tl?le?e
Packit 667938
           The full string cfgmaker by default would have used for the Title[]
Packit 667938
           directive in the configuration as well as the content of the
Packit 667938
           topmost H1 tag in the PageTop[].  Is composed by the contents of
Packit 667938
           $?$d?de?es?sc?c_?_p?pr?re?ef?fi?ix?x, $?$i?if?f_?_t?ti?it?tl?le?e_?_d?de?es?sc?c and $?$s?sy?ys?sn?na?am?me?e.
Packit 667938
Packit 667938
           As $?$i?if?f_?_t?ti?it?tl?le?e depends on $?$i?if?f_?_t?ti?it?tl?le?e_?_d?de?es?sc?c, it is possible to
Packit 667938
           indirectly control $?$i?if?f_?_t?ti?it?tl?le?e by using the command line option
Packit 667938
           -?--?-i?if?f-?-d?de?es?sc?cr?r.
Packit 667938
Packit 667938
           (HTML escaped variant: $?$h?ht?tm?ml?l_?_i?if?f_?_t?ti?it?tl?le?e)
Packit 667938
Packit 667938
       $?$i?if?f_?_p?po?or?rt?t_?_n?na?am?me?e
Packit 667938
           If the host is a Cisco Catalyst LAN switch, this variable is the
Packit 667938
           name of that port.  (No HTML escaped variant available)
Packit 667938
Packit 667938
       $?$i?if?f_?_p?pp?p_?_p?po?or?rt?t_?_n?na?am?me?e
Packit 667938
           If the host is a Nortel Passport LAN switch, this variable is the
Packit 667938
           name of that port.  (No HTML escaped variant available)
Packit 667938
Packit 667938
       $?$d?de?es?sc?c_?_p?pr?re?ef?fi?ix?x
Packit 667938
           This variable is a prefix of the description of what the target is
Packit 667938
           to use in the "Title[]" directive and in the H1 section of the
Packit 667938
           "PageTop[]".  Default is "Traffic analysis for ".  (HTML escaped
Packit 667938
           variant: $?$h?ht?tm?ml?l_?_d?de?es?sc?c_?_p?pr?re?ef?fi?ix?x)
Packit 667938
Packit 667938
       $?$i?if?f_?_t?ti?it?tl?le?e_?_d?de?es?sc?c
Packit 667938
           This is the description of the interface normally used by cfgmaker
Packit 667938
           as part of the variable $?$i?if?f_?_t?ti?it?tl?le?e.  The latter is used as the full
Packit 667938
           string in the "Title[]" directove and the H1 section in the
Packit 667938
           PageTop[].
Packit 667938
Packit 667938
           $?$i?if?f_?_t?ti?it?tl?le?e_?_d?de?es?sc?c is controlled by the command line option -?--?-i?if?f-?-d?de?es?sc?cr?r
Packit 667938
           which indirectly controls the contents of $?$i?if?f_?_t?ti?it?tl?le?e
Packit 667938
Packit 667938
           (HTML escaped variant: $?$h?ht?tm?ml?l_?_i?if?f_?_t?ti?it?tl?le?e_?_d?de?es?sc?c)
Packit 667938
Packit 667938
       _?H_?e_?l_?p _?F_?u_?n_?c_?t_?i_?o_?n_?s _?f_?o_?r _?T_?e_?m_?p_?l_?a_?t_?e_?s
Packit 667938
Packit 667938
       The following functions exists to facilitate the writing of host and
Packit 667938
       interface templates.
Packit 667938
Packit 667938
       h?ht?tm?ml?l_?_e?es?sc?ca?ap?pe?e(?(_?s?s_?t?t_?r?r_?i?i_?n?n_?g?g)?)
Packit 667938
           _?h?h_?t?t_?m?m_?l?l_?_?__?e?e_?s?s_?c?c_?a?a_?p?p_?e?e_?(?(_?)?) takes a string as an argument and returns a new
Packit 667938
           string where the following substitutions has been done:  the chars
Packit 667938
           "<", ">" and "&" are replaced by "<", ">" and "&" and
Packit 667938
           that newlines embedded in the string are prepended with "
" and
Packit 667938
           appended with a space character (newlines at the end of the string
Packit 667938
           are not touched).
Packit 667938
Packit 667938
       o?oi?id?d_?_p?pi?ic?ck?k(?($?$r?ro?ou?ut?te?er?r_?_c?co?on?nn?ne?ec?ct?t,?,$?$v?v3?3o?op?pt?t,?,"?"o?oi?id?d1?1"?",?,"?"o?oi?id?d2?2"?".?..?..?.)?)
Packit 667938
           This function will try to poll each of the oids specified until it
Packit 667938
           is successful or has run out of oids. It will return the name of
Packit 667938
           the first oid that worked or undef if it is not successful
Packit 667938
Packit 667938
       _?E_?x_?a_?m_?p_?l_?e _?T_?e_?m_?p_?l_?a_?t_?e _?F_?i_?l_?e_?s
Packit 667938
Packit 667938
       Template Example 1: Eliminating Rejected Targets From Appearing
Packit 667938
Packit 667938
       This template file generates exactly the same configuration code per
Packit 667938
       interface as cfgmaker does by default, with the exception that it
Packit 667938
       eliminates all lines (comments as well as config code) for an interface
Packit 667938
       if the interface happens to be rejected.
Packit 667938
Packit 667938
        if(not $problem_lines)
Packit 667938
        {
Packit 667938
          $target_lines .= <
Packit 667938
Packit 667938
        Target[$target_name]: $if_ref:$router_connect
Packit 667938
        SetEnv[$target_name]: MRTG_INT_IP="$if_ip" MRTG_INT_DESCR="$if_snmp_descr"
Packit 667938
        ECHO
Packit 667938
Packit 667938
          if ($directory_name) {
Packit 667938
              $target_lines .= "Directory[$target_name]: $directory_name\n";
Packit 667938
          }
Packit 667938
Packit 667938
          $target_lines .= <
Packit 667938
        MaxBytes[$target_name]: $if_speed
Packit 667938
        Title[$target_name]: $html_desc_prefix$html_if_title_desc -- $sysname
Packit 667938
        PageTop[$target_name]: 

$html_desc_prefix$html_if_title_desc -- $sysname

Packit 667938
                       
Packit 667938
                               
Packit 667938
                                       
Packit 667938
                                               System:
Packit 667938
                                               $sysname in $html_syslocation
Packit 667938
                                       
Packit 667938
                                       
Packit 667938
                                               Maintainer:
Packit 667938
                                               $html_syscontact
Packit 667938
                                       
Packit 667938
                                       
Packit 667938
                                               Description:
Packit 667938
                                               $html_if_description
Packit 667938
                                       
Packit 667938
                                       
Packit 667938
                                               ifType:
Packit 667938
                                               $html_if_type_desc ($if_type_num)
Packit 667938
                                       
Packit 667938
                                       
Packit 667938
                                               ifName:
Packit 667938
                                               $html_if_snmp_name
Packit 667938
                                       
Packit 667938
        ECHO
Packit 667938
Packit 667938
          $target_lines .= <
Packit 667938
                                       
Packit 667938
                                               Port Name:
Packit 667938
                                               $if_port_name
Packit 667938
                                       
Packit 667938
        ECHO
Packit 667938
Packit 667938
          $target_lines .= <
Packit 667938
                                       
Packit 667938
                                               Port Name:
Packit 667938
                                               $if_pp_port_name
Packit 667938
                                       
Packit 667938
        ECHO
Packit 667938
Packit 667938
          $target_lines .= <
Packit 667938
                                       
Packit 667938
                                               Max Speed:
Packit 667938
                                               $if_speed_str
Packit 667938
                                       
Packit 667938
        ECHO
Packit 667938
Packit 667938
          $target_lines .= <
Packit 667938
                                       
Packit 667938
                                               Ip:
Packit 667938
                                               $if_ip ($if_dns_name)
Packit 667938
                                       
Packit 667938
        ECHO
Packit 667938
Packit 667938
          $target_lines .= <
Packit 667938
                               
Packit 667938
                       
Packit 667938
        ECHO
Packit 667938
        } else {
Packit 667938
          $head_lines="";
Packit 667938
          $problem_lines="";
Packit 667938
          $target_lines="";
Packit 667938
          $separator_lines="";
Packit 667938
        }
Packit 667938
Packit 667938
       _?T_?e_?m_?p_?l_?a_?t_?e _?E_?x_?a_?m_?p_?l_?e _?2_?: _?S_?i_?m_?p_?l_?i_?e_?r _?V_?e_?r_?s_?i_?o_?n _?o_?f _?E_?x_?a_?m_?p_?l_?e _?1
Packit 667938
Packit 667938
       Example 1 was partly intended to demonstrate how to customize the
Packit 667938
       generation of interface targets but also to provide a hint of how the
Packit 667938
       variables are used in the "default" template which one could consider
Packit 667938
       that cfgmaker normally uses.
Packit 667938
Packit 667938
       If you're only intrested in the easiest way of entirely eliminating
Packit 667938
       those reject interfaces, the template below would do the job as well by
Packit 667938
       using $?$d?de?ef?fa?au?ul?lt?t_?_t?ta?ar?rg?ge?et?t_?_l?li?in?ne?es?s.
Packit 667938
Packit 667938
        if($if_ok) {
Packit 667938
         $target_lines = $default_target_lines;
Packit 667938
        } else {
Packit 667938
          $head_lines="";
Packit 667938
          $problem_lines="";
Packit 667938
          $target_lines="";
Packit 667938
          $separator_lines="";
Packit 667938
        }
Packit 667938
Packit 667938
       _?T_?e_?m_?p_?l_?a_?t_?e _?E_?x_?a_?m_?p_?l_?e _?3_?: _?C_?r_?e_?a_?t_?i_?n_?g _?C_?P_?U _?T_?a_?r_?g_?e_?t_?s _?f_?o_?r _?H_?o_?s_?t_?s
Packit 667938
Packit 667938
       Below is an example of a host template.
Packit 667938
Packit 667938
        $head_lines .= <
Packit 667938
        #---------------------------------------------------------------------
Packit 667938
        ECHO
Packit 667938
Packit 667938
        my $target_name = $router_name . ".cpu";
Packit 667938
Packit 667938
        $target_lines .= <
Packit 667938
Packit 667938
        YLegend[$target_name]: Percentage CPU load
Packit 667938
        ShortLegend[$target_name]: %
Packit 667938
        Legend1[$target_name]: CPU load in %
Packit 667938
        Legend2[$target_name]:
Packit 667938
        Legend3[$target_name]: Max Observed CPU load
Packit 667938
        Legend4[$target_name]:
Packit 667938
        LegendI[$target_name]:  CPU Load:
Packit 667938
        LegendO[$target_name]:
Packit 667938
        WithPeak[$target_name]: ywm
Packit 667938
        MaxBytes[$target_name]: 100
Packit 667938
        Options[$target_name]: growright, gauge, nopercent
Packit 667938
        Title[$target_name]: $router_name CPU load
Packit 667938
        Target[$target_name]: 1.3.6.1.4.1.9.2.1.58.0&1.3.6.1.4.1.9.2.1.58.0:$router_connect
Packit 667938
        PageTop[$target_name]: 

$router_name CPU load

Packit 667938
                       
Packit 667938
                               
Packit 667938
                                       
Packit 667938
                                               System:
Packit 667938
                                               $router_name in $html_syslocation
Packit 667938
                                       
Packit 667938
                                       
Packit 667938
                                               Maintainer:
Packit 667938
                                               $html_syscontact
Packit 667938
                                       
Packit 667938
                                       
Packit 667938
                                               Description:
Packit 667938
                                               $html_sysdescr
Packit 667938
                                       
Packit 667938
                                       
Packit 667938
                                               Resource:
Packit 667938
                                               CPU.
Packit 667938
                                       
Packit 667938
                               
Packit 667938
                       
Packit 667938
        ECHO
Packit 667938
Packit 667938
E?EX?XA?AM?MP?PL?LE?ES?S
Packit 667938
       The first example creates a config file for _?r_?o_?u_?t_?e_?r_?._?p_?l_?a_?c_?e_?._?x_?y_?z:  the
Packit 667938
       router has the community name _?p_?u_?b_?l_?i_?c.  Interfaces get identified by
Packit 667938
       their IP number.  Two global options get added to the config file.  The
Packit 667938
       config file gets redirected to _?m_?r_?t_?g_?._?c_?o_?n_?f.  The '\' signs at the end of
Packit 667938
       the line mean that this command should be written on a single line.
Packit 667938
Packit 667938
        cfgmaker --global "WorkDir: /home/tobi"           \
Packit 667938
                 --global "Options[_]: growright,bits"    \
Packit 667938
                 --ifref=ip                               \
Packit 667938
                 public@router.place.xyz > mrtg.cfg
Packit 667938
Packit 667938
       Note: if cfgmaker is not in your path, but you are in the directory
Packit 667938
       where cfgmaker is stored, you can start it with ./cfgmaker
Packit 667938
Packit 667938
       The next example creates a config file for four devices:
Packit 667938
       _?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
Packit 667938
       _?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.
Packit 667938
Packit 667938
       The two routers will have -?--?-i?if?fr?re?ef?f set to d?de?es?sc?cr?r whilst the two switches
Packit 667938
       will use -?--?-i?if?fr?re?ef?f set to n?na?am?me?e.  Further the routers will use -?--?-i?if?fd?de?es?sc?c
Packit 667938
       set to a?al?li?ia?as?s and _?s_?w_?i_?t_?c_?h_?1_?._?p_?l_?a_?c_?e_?._?x_?y_?z will use -?--?-i?if?fd?de?es?sc?c set to d?de?es?sc?cr?r
Packit 667938
       whilst _?s_?w_?i_?t_?c_?h_?2_?._?p_?l_?a_?c_?e_?._?x_?y_?z use n?na?am?me?e instead.
Packit 667938
Packit 667938
       Finally, there will be two Options lines inserted in the configuration:
Packit 667938
       One will be in the beginning, whilst the other will be inserted after
Packit 667938
       the lines related to the two routers but before those lines related to
Packit 667938
       the switches.
Packit 667938
Packit 667938
        cfgmaker --global "WorkDir: /home/tobi"           \
Packit 667938
                 --global "Options[_]: growright,bits"    \
Packit 667938
                 --ifref=descr                            \
Packit 667938
                 --ifdesc=alias                           \
Packit 667938
                 public@router1.place.xyz                 \
Packit 667938
                 public@router2.place.xyz                 \
Packit 667938
                 --global "Options[_]: growright"         \
Packit 667938
                 --ifref=name                             \
Packit 667938
                 --ifdesc=descr                           \
Packit 667938
                 public@switch1.place.xyz                 \
Packit 667938
                 --ifdesc=name                            \
Packit 667938
                 public@switch2.place.xyz > mrtg.cfg
Packit 667938
Packit 667938
       The next example demonstrates how to use the -?--?-c?co?om?mm?mu?un?ni?it?ty?y,
Packit 667938
       -?--?-s?sn?nm?mp?p-?-o?op?pt?ti?io?on?ns?s and -?--?-d?dn?ns?s-?-d?do?om?ma?ai?in?n to make the command line simpler.  All
Packit 667938
       the equipment will use the community _?h_?i_?d_?d_?e_?n, except for the ppp-server
Packit 667938
       which use community _?a_?c_?c_?e_?s_?s.  All equipment uses these SNMP options: 1?1s?s
Packit 667938
       t?ti?im?me?eo?ou?ut?t, 1?1 r?re?et?tr?ry?y and S?SN?NM?MP?P v?ve?er?rs?si?io?on?n 2?2 (b?ba?ac?ck?ko?of?ff?f and p?po?or?rt?t is unspecified
Packit 667938
       which means they use the default values).  The exception again is the
Packit 667938
       ppp-server which uses S?SN?NM?MP?P v?ve?er?rs?si?io?on?n 1?1.  Finally, all the equipment is
Packit 667938
       part of the domain _?p_?l_?a_?c_?e_?._?x_?y_?z, except for the ppp-server which is part
Packit 667938
       of the domain _?r_?e_?m_?o_?t_?e_?._?p_?l_?a_?c_?e_?._?x_?y_?z.  Note that the latter is achieved
Packit 667938
       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
Packit 667938
       .
Packit 667938
Packit 667938
        cfgmaker --global "WorkDir: /home/tobi"           \
Packit 667938
                 --global "Options[_]: growright,bits"    \
Packit 667938
                 --dns-domain=place.xyz                   \
Packit 667938
                 --community=hidden                       \
Packit 667938
                 --snmp-options=::1:1::2                  \
Packit 667938
                 router1                                  \
Packit 667938
                 router2                                  \
Packit 667938
                 router3                                  \
Packit 667938
                 router4                                  \
Packit 667938
                 router5                                  \
Packit 667938
                 switch1                                  \
Packit 667938
                 switch2                                  \
Packit 667938
                 switch3                                  \
Packit 667938
                 switch4                                  \
Packit 667938
                 switch5                                  \
Packit 667938
                 switch6                                  \
Packit 667938
                 switch7                                  \
Packit 667938
                 access@ppp-server.remote:::::1 > mrtg.cfg
Packit 667938
Packit 667938
S?SE?EE?E A?AL?LS?SO?O
Packit 667938
       mrtg-reference
Packit 667938
Packit 667938
A?AU?UT?TH?HO?OR?R
Packit 667938
       Tobias Oetiker <tobi@oetiker.ch> and Jakob Ilves
Packit 667938
       <jakob.ilves@oracle.com>
Packit 667938
Packit 667938
L?LI?IC?CE?EN?NS?SE?E
Packit 667938
       GNU General Public License
Packit 667938
Packit 667938
C?CO?OP?PY?YR?RI?IG?GH?HT?T
Packit 667938
       Cfgmaker is Copyright 2000 by Tobias Oetiker <tobi@oetiker.ch>
Packit 667938
Packit 667938
Packit 667938
Packit 667938
2.17.7                            2018-07-13                       CFGMAKER(1)