NAME

cfgmaker - Creates mrtg.cfg files (mrtg-2.9.1)


SYNOPSIS

cfgmaker [options] community@router [community@router ...]


OPTIONS

 --ifref=nr       interface referneces 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
 --global "x: a"  add global config entries
 --no-down        do not look at admin or opr status of interfaces
 --descint        describe interface instead of just 'Traffic Analysis for'
 --subdirs        give each router its own subdirectory
 --help           brief help message
 --man            full documentation
 --output=file    output filename default is STDOUT


DESCRIPTION

Cfgmaker creates mrtg configuration files based on information pulled from a router or an other SNMP managable device.

community@router
Community is the community name of the device you want to create a configuration for. The default community name is 'public' 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.

Router is the dns name or the ip number of an SNMP managable device. Following the name you can specify 6 further options separated by colons. The full syntax looks like this:

   B<router>[:[B<port>][:[B<timeout>][:[B<retries>][:[B<backoff>][:B<version>]]]]]

Of special interest may be: the last parameter (version) 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).

--help
Print a brief help message and exits.

--man
Prints the manual page and exits.

--ifref nr|ip|eth|descr|name
Select the interface identification methode. Default is nr 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 3 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 ip to identify the interface by its IP number. Use eth to use the ethernet address for identification. Or use descr to use the Interface description.

If your chosen methode does not allow unique interface identification on the device you are queriing, cfgmaker will tell you about it.

--global ``bla: abc''
Use this to add global options to the generated config file. You can call --global several times to add multiple options.
 --global "workdir: /home/mrtg"

If you want some default Options you might want to put

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

--no-down
Normally cfgmaker will not include interface which are marked anything but administratively and operationally UP. With this switch you get them all.

--subdirs
Give each router its own subdirectory (Directory[_]: router_name) for the HTML and graphics files.


EXAMPLE

This example creates a config file for router.place.xyz the router has the community name public. Interfaces get identified by their IP number. Two global options get added to the config file. The config file gets redirected to mrtg.conf. The '\' signs at the end of the line mean that this command should be written on a singel line.

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


AUTHOR

Tobias Oetiker <tobi@oetiker.ch>


LICENSE

GNU General Public License


COPYRIGHT

Cfgmaker is Copyright 2000 by Tobias Oetiker <tobi@oetiker.ch>