Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 722d7fe08e521069eaa66d51f59d0ed2 > files > 519

mrtg-2.9.17-4mdk.i586.rpm

.\" Automatically generated by Pod::Man version 1.15
.\" Tue Jun  5 13:09:34 2001
.\"
.\" Standard preamble:
.\" ======================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R

.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  | will give a
.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used
.\" to do unbreakable dashes and therefore won't be available.  \*(C` and
.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr
.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
.\" index entries marked with X<> in POD.  Of course, you'll have to process
.\" the output yourself in some meaningful fashion.
.if \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.\"
.\" For nroff, turn off justification.  Always turn off hyphenation; it
.\" makes way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.bd B 3
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ======================================================================
.\"
.IX Title "REFERENCE 1"
.TH REFERENCE 1 "2.9.17" "2001-06-05" "mrtg"
.UC
.SH "NAME"
reference \- \s-1MRTG\s0 2.9.17 configuration reference
.SH "OVERVIEW"
.IX Header "OVERVIEW"
The runtime behaviour of \s-1MRTG\s0 is governed by a configuration file. Run of
the mill configuration files can be generated with \fBcfgmaker\fR. (Check
the cfgmaker manpage). But for more elaborate configurations some hand tuning is
required.
.PP
This document describes all the configuration options understud by
the mrtg software.
.SH "SYNTAX"
.IX Header "SYNTAX"
\&\s-1MRTG\s0 configuration file syntax follows some simple rules:
.Ip "\(bu" 4
Keywords must start at the beginning of a line.
.Ip "\(bu" 4
Lines which follow a keyword line which do start
with a blank are appended to the keyword line
.Ip "\(bu" 4
Empty Lines are ignored
.Ip "\(bu" 4
Lines starting with a # sign are comments.
.Ip "\(bu" 4
You can add other files into the configuration file using
.Sp
\&\fBInclude:\fR \fIfile\fR
.Sp
Example:
.Sp
.Vb 1
\& Include: base-options.inc
.Ve
.SH "GLOBAL PARAMETERS"
.IX Header "GLOBAL PARAMETERS"
.Sh "WorkDir"
.IX Subsection "WorkDir"
WorkDir specifies where the logfiles and the webpages should
be created.
.PP
Example:
.PP
.Vb 1
\& WorkDir: /usr/tardis/pub/www/stats/mrtg
.Ve
.SH "OPTIONAL GLOBAL PARAMETERS"
.IX Header "OPTIONAL GLOBAL PARAMETERS"
.Sh "HtmlDir"
.IX Subsection "HtmlDir"
HtmlDir specifies the directory where the html (or shtml,
but we'll get on to those later,) lives.
.PP
\&\s-1NOTE:\s0 Workdir overides the settings for htmldir, imagedir
      and logdir
.PP
Example:
.PP
.Vb 1
\& Htmldir: /www/mrtg/
.Ve
.Sh "ImageDir"
.IX Subsection "ImageDir"
ImageDir specifies the directory where the images live, they
should be under the html directory.
.PP
Example:
.PP
.Vb 1
\& Imagedir: /www/mrtg/images
.Ve
.Sh "LogDir"
.IX Subsection "LogDir"
LogDir specifies the directory where the logs are stored.
This need not be under htmldir directive.
.PP
Example:
.PP
.Vb 1
\& Logdir: /www/mrtg/logs
.Ve
.Sh "Forks (\s-1UNIX\s0 only)"
.IX Subsection "Forks (UNIX only)"
An a system that can fork (\s-1UNIX\s0 for example) mrtg can fork itself into multiple
instances while it is acquiring data via snmp.
.PP
For situations with high latency or a great number of devices
this will speed things up considerably. It will not make things faster
though if you query a single switch sitting next door.
.PP
As far as I know \s-1NT\s0 can not fork so this option is not available on \s-1NT\s0.
.PP
Example:
.PP
.Vb 1
\& Forks: 4
.Ve
.Sh "Refresh"
.IX Subsection "Refresh"
How many seconds apart should the browser (Netscape) be
instructed to reload the page? If this is not defined, the
default is 300 seconds (5 minutes).
.PP
Example:
.PP
.Vb 1
\& Refresh: 600
.Ve
.Sh "Interval"
.IX Subsection "Interval"
How often do you call mrtg? The default is 5 minutes. If
you call it less often, you should specify it here. This
does two things:
.Ip "\(bu" 4
the generated \s-1HTML\s0 page does contain the right
information about the calling interval ...
.Ip "\(bu" 4
a \s-1META\s0 header in the generated \s-1HTML\s0 page will instruct
caches about the time to live of this page .....
.PP
In this example we tell mrtg that we will be calling it
every 10 minutes. If you are calling mrtg every 5
minutes, you can leave this line commented out.
.PP
Example:
.PP
.Vb 1
\& Interval: 10
.Ve
.Sh "WriteExpires"
.IX Subsection "WriteExpires"
With this switch mrtg will generate .meta files for \s-1CERN\s0
and Apache servers which contain Expiration tags for the
html and gif files. The *.meta files will be created in
the same directory as the other files, so you will have
to set \*(L"MetaDir .\*(R" and \*(L"MetaFiles on\*(R"
in your apache.conf or .htaccess file for this to work
.PP
\&\s-1NOTE:\s0 If you are running Apache-1.2 or later, you can use the mod_expire
to achieve the same effect ... see the file htaccess.txt
.PP
Example:
.PP
.Vb 1
\& WriteExpires: Yes
.Ve
.Sh "NoMib2"
.IX Subsection "NoMib2"
Normally we ask the \s-1SNMP\s0 device for 'sysUptime', 'sysName' properties
some do not have these. If you want to avoid getting complaints from
mrtg about these missing properties, specivy the nomib2 option.
.PP
An example of agents which do not implement base mib2 attributes are
Computer Associates \- Unicenter \s-1TNG\s0 Agents.  \s-1CA\s0 relies on using the base
\&\s-1OS\s0 \s-1SNMP\s0 agent in addition to its own agents to supplement the management
of a system.
.PP
Example:
.PP
.Vb 1
\& NoMib2: Yes
.Ve
.Sh "SingleRequest"
.IX Subsection "SingleRequest"
Some \s-1SNMP\s0 implementations can not deal with requests asking for
multiple snmp variables in one go. Set this in your cfg file to force
mrtg to only ask for one variable per request.
.PP
Examples
.PP
.Vb 1
\& SingleRequest: Yes
.Ve
.Sh "SnmpOptions"
.IX Subsection "SnmpOptions"
Apart form the per target timeout options, you can also configure the
behaviour of the snmpget process on a more profound level. SnmpOptions
accepts a hash of options. The following options are currently supported:
.PP
.Vb 6
\& timeout                   => $default_timeout,
\& retries                   => $default_retries,
\& backoff                   => $default_backoff,
\& default_max_repetitions   => $max_repetitions,
\& lenient_source_port_matching => 0,
\& lenient_source_address_matching => 1
.Ve
The values behind the options indicate the current default value.
Note that these settings \s-1OVERRIDE\s0 the per target timeout settings.
.PP
Example:
.PP
SnmpOptions: retries => 2, only_ip_address_matching => 0
.PP
Note that \s-1AS/400\s0 snmp seesm to be broken in a way which prevents mrtg from
working with it unless 
.PP
.Vb 1
\& SnmpOptions: lenient_source_port_matching => 1
.Ve
is set.
.Sh "IconDir"
.IX Subsection "IconDir"
If you want to keep the mrtg icons in some place other than the
working (or imagedir) directory, use the \fIIconDir\fR variable for
defining the url to the icons directory.
.PP
Example:
.PP
.Vb 1
\& IconDir: /mrtgicons/
.Ve
.Sh "LoadMIBs"
.IX Subsection "LoadMIBs"
Load the \s-1MIB\s0 \fIfile\fR\|(s) specified and make its OIDs available as
symbolic names. For better efficiancy, a cache of MIBs is maintained
in the WorkDir.
.PP
Example:
.PP
.Vb 1
\& LoadMIBs: /dept/net/mibs/netapp.mib,/usr/local/lib/ft100m.mib
.Ve
.Sh "Language"
.IX Subsection "Language"
Switch output format to the selected Language (Check the \fItranslate\fR directory
to see which languages are supported at the moment. In this directory you
can also find instructions on how to create new translations).
.PP
Currently the following laguages are supported: big5, brazilian, bulgarian,
catalan, chinese, czech, danish, dutch, eucjp, french, galician, gb, gb2312,
german, greek, hungarian, icelandic, iso2022jp, italian, korean, lithuanian,
malay, norwegian, polish, romanian, russian, serbian, slovak, slovenian,
spanish, swedish, turkish
.PP
Example:
.PP
.Vb 1
\& Language: danish
.Ve
.Sh "LogFormat"
.IX Subsection "LogFormat"
Setting LogFormat to 'rrdtool' in your mrtg.cfg file enables rrdtool mode.
In rrdtool mode, mrtg relies on \fBrrdtool\fR to do its logging. Graphs and html
pages will be generated on the fly by the 14all.cgi which can be found in
the contrib section together with a short readme ... This feature has been
contributed by Rainer.Bawidamann@informatik.uni-ulm.de. Please check his
website for more information: http://www.uni-ulm.de/~rbawidam/mrtg-rrd/
.PP
Example:
.PP
.Vb 1
\& LogFormat: rrdtool
.Ve
.Sh "LibAdd"
.IX Subsection "LibAdd"
If you are using rrdtool mode and your \fBrrdtool\fR Perl module (RRDs.pm)
is not installed in a location where perl can find it on its own, you can
use LibAdd to supply an appropriate path.
.PP
Example:
.PP
.Vb 1
\& LibAdd: /usr/local/rrdtool/lib/perl/
.Ve
.Sh "PathAdd"
.IX Subsection "PathAdd"
If the \fBrrdtool\fR executable can not be found in the normal \f(CW\*(C`PATH\*(C'\fR, you can use
this parameter to add a suitable directory to your path.
.PP
Example:
.PP
.Vb 1
\& PathAdd: /usr/local/rrdtool/bin/
.Ve
.Sh "RunAsDaemon"
.IX Subsection "RunAsDaemon"
The RunAsDaemon keyword enables daemon mode operation. The purpose of daemon
mode is that \s-1MRTG\s0 is launched once and not at regular basis by cron as in
native mode. This behavior saves computing resourses as loading and parsing
of configuration files only hapens once.
.PP
Using daemon mode \s-1MRTG\s0 itself is responible for timing the measurement
intervals. Therfore its important to set the Interval keyword to an
apropiate value.
.PP
Note that using daemon mode \s-1MRTG\s0 should no longer be started from cron by
regular basis as each started process runs forever. Instead \s-1MRTG\s0 should be
started from the command prompt or by a system startup script.
.PP
If you want mrtg to run under a particular user and group (it is not recomented to run
\&\s-1MRTG\s0 as root) then you can use the \fB\*(--user=\fR\fIuser_name\fR and \fB\*(--group=\fR\fIgroup_name\fR
options on the mrtg commandline.
.PP
.Vb 1
\& mrtg --user=mrtg_user --group=mrtg_group mrtg.cfg
.Ve
Also note that in daemon mode restart of the process is required in order to
activate changes in the config file.
.PP
Under \s-1UNIX\s0, the Daemon switch causes mrtg to fork into background after
checking its config file. On Windows \s-1NT\s0 the \s-1MRTG\s0 process will detach from
the console, but because the \s-1NT/2000\s0 shell waits for its children you have to
use the special start sequence when you launch the program:
.PP
.Vb 1
\& start /b perl mrtg mrtg.cfg
.Ve
You may have to add path information equal to what you add when you run mrtg
from the commandline.
.PP
Example
.PP
.Vb 2
\& RunAsDaemon:Yes
\& Interval:5
.Ve
Makes \s-1MRTG\s0 run as a daemon beginning data collection every 5 minutes
.SH "PER TARGET CONFIGURATION"
.IX Header "PER TARGET CONFIGURATION"
Each monitoring target must be identified by a unique name. This
name must be appended to each parameter belonging to the same
target. The name will also be used for naming the
generated webpages, logfiles and images for this target.
.Sh "Target"
.IX Subsection "Target"
With the \fITarget\fR keyword you tell mrtg what it should
monitor. The \fITarget\fR keyword takes arguments in a wide
range of formats:
.Ip "Basic" 4
.IX Item "Basic"
The most basic format is \*(L"port:community@router\*(R"
This will generate a traffic graph for the interface 'port'
of the host 'router' (dns name or \s-1IP\s0 address)
and it will use the community 'community' (snmp password)
for the snmp query.
.Sp
Example:
.Sp
.Vb 1
\& Target[ezwf]: 2:public@wellfleet-fddi.ethz.ch
.Ve
If your community contains a \*(L"@\*(R" or a \*(L" \*(R" these characters
mus be escaped with a \*(L"\e\*(R".
.Sp
.Vb 1
\& Target[bla]: 2:stu\e pi\e@d@router
.Ve
.Ip "SNMPv2c" 4
.IX Item "SNMPv2c"
If you have a fast router you might want to try to poll the ifHC* counters.
This feature gets activated by switching to SNMPv2c. Unfortunately not all
devices support SNMPv2c yet. If it works, this will prevent your counters
from wraping within the 5 minute polling interval. As we now use 64 bit
instead of the normal 32 bit.
.Sp
Example:
.Sp
.Vb 1
\& Target[ezwf]: 2:public@router1:::::2
.Ve
.Ip "Reversing" 4
.IX Item "Reversing"
Sometimes you are sitting on the wrong side of the
link, and you would like to have mrtg report Incoming
traffic as outgoing and vice versa. This can be achieved
by adding the '\-' sign in front of the \*(L"Target\*(R"
description. It flips the incoming and outgoing traffic rates.
.Sp
Example:
.Sp
.Vb 1
\& Target[ezci]: -1:public@ezci-ether.ethz.ch
.Ve
.Ip "Explicit OIDs" 4
.IX Item "Explicit OIDs"
You can also explicitly define the \s-1OID\s0 to query by using the
following syntax '\s-1OID_1&OID_2\s0:community@router'
The following example will retrieve error counts for input and output
on interface 1.  \s-1MRTG\s0 needs to graph two variables,
so you need to specify two \s-1OID\s0's such as temperature and humidity
or error input and error output.
.Sp
Example:
.Sp
.Vb 1
\& Target[ezwf]: 1.3.6.1.2.1.2.2.1.14.1&1.3.6.1.2.1.2.2.1.20.1:public@myrouter
.Ve
.Ip "\s-1MIB\s0 Variables" 4
.IX Item "MIB Variables"
\&\s-1MRTG\s0 knows a number of symbolical \s-1SNMP\s0 variable names.
See the file mibhelp.txt for a list of known names.
One example are the ifInErrors and ifOutErrors.
This means you can specify the above as:
.Sp
Example:
.Sp
.Vb 1
\& Target[ezwf]: ifInErrors.1&ifOutErrors.1:public@myrouter
.Ve
.Ip "Interface by \s-1IP\s0" 4
.IX Item "Interface by IP"
Sometimes \s-1SNMP\s0 interface index can change, like when new interfaces are
added or removed. This can cause all Target entries in your config file
to become wrong by offset, causing \s-1MRTG\s0 to graphs wrong instances etc.
\&\s-1MRTG\s0 supports \s-1IP\s0 address instead of ifindex in target definition. Then
\&\s-1MRTG\s0 will query snmp device and try to map \s-1IP\s0 address to current ifindex,
You can use \s-1IP\s0 address in every type of target definition, by adding
\&\s-1IP\s0 address of the numbered interface after \s-1OID\s0 and separation char '/'
.Sp
Make sure that given \s-1IP\s0 address is used on your same target router,
your same target router, especially when graphing two different OIDs
and/or interface split by '&' delimiter.
.Sp
You can tell cfgmaker to generate such references with the option
\&\fB\*(--ifref=ip\fR.
.Sp
Example:
.Sp
.Vb 4
\& Target[ezwf]: /1.2.3.4:public@wellfleet-fddi.ethz.ch
\& Target[ezci]: -/1.2.3.4:public@ezci-ether.ethz.ch
\& Target[ezwf]: 1.3.6.1.2.1.2.2.1.14/1.2.3.4&1.3.6.1.2.1.2.2.1.14/1.2.3.4:public@myrouter
\& Target[ezwf]: ifInErrors/1.2.3.4&ifOutErrors/1.2.3.4:public@myrouter
.Ve
.Ip "Interface by Description" 4
.IX Item "Interface by Description"
If you can not use \s-1IP\s0 addresses you might want to use
the interface names. This works similar to the \s-1IP\s0 address aproach
only that the prefix to use is a \e instead of a /
.Sp
You can tell cfgmaker to generate such references with the option
\&\fB\*(--ifref=descr\fR.
.Sp
Example:
.Sp
.Vb 4
\& Target[ezwf]: \eMy-Interface2:public@wellfleet-fddi.ethz.ch
\& Target[ezci]: -\eMy-Interface2:public@ezci-ether.ethz.ch
\& Target[ezwf]: 1.3.6.1.2.1.2.2.1.14\eMy-Interface2&1.3.6.1.2.1.2.2.1.14\eMy-Interface3:public@myrouter
\& Target[ezwf]: ifInErrors\eMy-Interface2&ifOutErrors\eMy-Interface3:public@myrouter
.Ve
If your description contains a \*(L"&\*(R", a \*(L":\*(R", a \*(L"@\*(R" or a \*(L" \*(R" you can include
them but you must escape with a backlash:
.Sp
.Vb 1
\& Target[ezwf]: \efun\e: \e ney\e&ddd:public@hello.router
.Ve
.Ip "Interface by Name" 4
.IX Item "Interface by Name"
The only sensible way to reference interfaces of your switches.
.Sp
You can tell cfgmaker to generate such references with the option
\&\fB\*(--ifref=name\fR.
.Sp
Example:
.Sp
.Vb 4
\& Target[ezwf]: #2/11:public@wellfleet-fddi.ethz.ch
\& Target[ezci]: -#2/11:public@ezci-ether.ethz.ch
\& Target[ezwf]: 1.3.6.1.2.1.2.2.1.14#3/7&1.3.6.1.2.1.2.2.1.14#3/7:public@myrouter
\& Target[ezwf]: ifInErrors#3/7&ifOutErrors#3/7:public@myrouter
.Ve
If your description contains a \*(L"&\*(R", a \*(L":\*(R", a \*(L"@\*(R" or a \*(L" \*(R" you can include them but you must escape with
a backlash:
.Sp
.Vb 1
\& Target[ezwf]: #\e: \e fun:public@hello.router
.Ve
\&\fINote that the # sign will be interpreted as a comment character if
it is the first non white-space character on the line.\fR
.Ip "Interface by Ethernet Address" 4
.IX Item "Interface by Ethernet Address"
When the \s-1SNMP\s0 interface index changes, you can key that interface by its
\&'Physical Address', sometimes called a 'hard address', which is the \s-1SNMP\s0
variable 'ifPhysAddress'.  Internally, \s-1MRTG\s0 matches the Physical Address from
the *.cfg file to its current index, and then uses that index for the rest of
the session.
.Sp
You can use the Physical Address in every type of target definition, by adding
the Physical Address after the \s-1OID\s0 and separation char '!' (analogous to the \s-1IP\s0
address option).  The Physical address is specified as '\-' delimited
octets, such as \*(L"0a-0\-f1\-5\-23\-18\*(R" (omit the double quotes). Note that some
routers use the same Hardware Ethernet Address for all their Interface which
prevents unique interface identification. Mrtg will notice such problems and alert you.
.Sp
You can tell cfgmaker to generate configuration files with hardware ethernet address references
by using the option \fB\*(--ifref=eth\fR.
.Sp
Example:
.Sp
.Vb 4
\& Target[ezwf]: !0a-0b-0c-0d:public@wellfleet-fddi.ethz.ch
\& Target[ezci]: -!0-f-bb-05-71-22:public@ezci-ether.ethz.ch
\& Target[ezwf]: 1.3.6.1.2.1.2.2.1.14!0a-00-10-23-44-51&!0a-00-10-23-44-51:public@myrouter
\& Target[ezwf]: ifInErrors!0a-00-10-23-44-51&ifOutErrors!0a-00-10-23-44-51:public@myrouter
.Ve
.Ip "Interface by Type" 4
.IX Item "Interface by Type"
It seems that there are devices that try to defy all monitoring efforts, the interesting interfaces have
neither ifName nor a constant ifDescr not to think of a persistant ifIndex. The only way to get a constant
mapping is by looking at the interface type, because the interface you are interested in is unique in the
device you are looking at ...
.Sp
You can tell cfgmaker to generate such references with the option
\&\fB\*(--ifref=type\fR.
.Sp
Example:
.Sp
.Vb 4
\& Target[ezwf]: %13:public@wellfleet-fddi.ethz.ch
\& Target[ezci]: -%13:public@ezci-ether.ethz.ch
\& Target[ezwf]: 1.3.6.1.2.1.2.2.1.14%13&1.3.6.1.2.1.2.2.1.14%14:public@myrouter
\& Target[ezwf]: ifInErrors%13&ifOutErrors%14:public@myrouter
.Ve
.Ip "Extended Host Name Syntax" 4
.IX Item "Extended Host Name Syntax"
In all places where ``community@router'' is accepted, you can add
additional parameters for the \s-1SNMP\s0 communication using
colon-separated suffixes. The full syntax is as follows:
.Sp
.Vb 1
\& community@router[:[port][:[timeout][:[retries][:[backoff][:version]]]]]
.Ve
where the meaning of each parameter is as follows:
.RS 4
.Ip "port" 4
.IX Item "port"
the \s-1UDP\s0 port under which to contact the \s-1SNMP\s0 agent (default: 161)
.Ip "timeout" 4
.IX Item "timeout"
initial timeout for \s-1SNMP\s0 queries, in seconds (default: 2.0)
.Ip "retries" 4
.IX Item "retries"
number of times a timed-out request will be retried (default: 5)
.Ip "backoff" 4
.IX Item "backoff"
factor by which the timeout is multiplied on every retry (default: 1.0).
.Ip "version" 4
.IX Item "version"
for \s-1SNMP\s0 version if you have a fast router you might want to put
a '2' here. This will make mrtg try to poll the 64 bit counters. And thus
prevent excessive counter wrapping. Not all routers support this though.
.Sp
Example:
.Sp
.Vb 1
\& 3:public@router1:::::2
.Ve
.RE
.RS 4
.Sp
A value that equals the default value can be omitted.  Trailing colons
can be omitted, too.
.Sp
Example:
.Sp
.Vb 1
\&  Target[ezci]: 1:public@ezci-ether.ethz.ch:9161::4
.Ve
This would refer to the input/output octet counters for the interface
with \fIifIndex 1\fR on \fIezci-ether.ethz.ch\fR, as known
by the \s-1SNMP\s0 agent listening on \s-1UDP\s0 port 9161.  The standard initial
timeout (2.0 seconds) is used, but the number of retries is set to
four.  The backoff value is the default.
.RE
.Ip "External Monitoring Scripts" 4
.IX Item "External Monitoring Scripts"
if you want to monitor something which does not provide
data via snmp you can use some external program to do
the data gathering.
.Sp
The external command must return 4 lines of output:
.RS 4
.Ip "Line 1" 4
.IX Item "Line 1"
current state of the first variable, normally 'incoming bytes count'
.Ip "Line 2" 4
.IX Item "Line 2"
current state of the second variable, normally 'outgoing bytes count'
.Ip "Line 3" 4
.IX Item "Line 3"
string (in any human readable format), telling the uptime of the target.
.Ip "Line 4" 4
.IX Item "Line 4"
string, telling the name of the target.
.RE
.RS 4
.Sp
Depending on the type of data your script returns you
might want to use the 'gauge' or 'absolute' arguments
for the \fIOptions\fR keyword.
.Sp
Example:
.Sp
.Vb 1
\& Target[ezwf]: `/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0`
.Ve
Note the use of the backticks (`), not apostrophes (')
around the command.
.Sp
If you want to use a backtick in the command  name this can be done
but you must escape it with a backslash ...
.RE
.Ip "Multi Target Syntax" 4
.IX Item "Multi Target Syntax"
You can also use several statements in a mathematical
expression.  This could be used to aggregate both B channels
in an \s-1ISDN\s0 connection or multiple T1s that are aggregated
into a single channel for greater bandwidth.
Note the whitespace arround the target definitions.
.Sp
Example:
.Sp
.Vb 2
\& Target[ezwf]: 2:public@wellfleetA + 1:public@wellfleetA
\&              * 4:public@ciscoF
.Ve
.Sh "RouterUptime"
.IX Subsection "RouterUptime"
In cases where you calculate the used bandwidth from
several interfaces you normaly don't get the router uptime
and router name displayed on the web page.
.PP
If these interfaces are on the same router and the uptime and
name should be displayed nevertheless you have to specify
its community and address again with the \fIRouterUptime\fR keyword.
.PP
Example:
.PP
.Vb 2
\& Target[kacisco.comp.edu]: 1:public@194.64.66.250 + 2:public@194.64.66.250
\& RouterUptime[kacisco.comp.edu]: public@194.64.66.250
.Ve
.Sh "MaxBytes"
.IX Subsection "MaxBytes"
The maximum value either of the two variables monitored
are allowed to reach. For monitoring router traffic
this is normally specified in bytes per second this
interface port can carry.
.PP
If a number higher than \fIMaxBytes\fR is returned, it is ignored.
Also read the section on \fIAbsMax\fR for further info.
The \fIMaxBytes\fR value is also used in calculating the Y range
for unscaled graphs (see the section on \fIUnscaled\fR).
.PP
Since most links are rated in bits per second, you need to divide
their maximum bandwidth (in bits) by eight (8) in order to get
bytes per second.  This is very important to make your
unscaled graphs display realistic information.
T1 = 193000, 56K = 7000, Ethernet = 1250000. The \fIMaxBytes\fR
value will be used by mrtg to decide whether it got a
valid response from the router.
.PP
If you need two different MaxBytes values for the two monitored
variables, you can use MaxBytes1 and MaxBytes2 instead of MaxBytes.
.PP
Example:
.PP
.Vb 1
\& MaxBytes[ezwf]: 1250000
.Ve
.Sh "MaxBytes1"
.IX Subsection "MaxBytes1"
Same as MaxBytes, for variable 1.
.Sh "MaxBytes2"
.IX Subsection "MaxBytes2"
Same as MaxBytes, for variable 2.
.Sh "Title"
.IX Subsection "Title"
Title for the \s-1HTML\s0 page which gets generated for the graph.
.PP
Example:
.PP
.Vb 1
\& Title[ezwf]: Traffic Analysis for Our Nice Company
.Ve
.Sh "PageTop"
.IX Subsection "PageTop"
Things to add to the top of the generated \s-1HTML\s0 page.  Note
that you can have several lines of text as long as the
first column is empty.
.PP
Note that the continuation lines will all end up on the same
line in the html page. If you want linebreaks in the generated
html use the '\en' sequence.
.PP
Example:
.PP
.Vb 4
\& PageTop[ezwf]: <H1>Traffic Analysis for ETZ C95.1</H1>
\&   Our Campus Backbone runs over an FDDI line\en
\&   with a maximum transfer rate of 12.5 megabytes per
\&   Second.
.Ve
.SH "OPTIONAL PER TARGET PARAMETERS"
.IX Header "OPTIONAL PER TARGET PARAMETERS"
.Sh "PageFoot"
.IX Subsection "PageFoot"
Things to add to the bottom of the generated \s-1HTML\s0 page.  Note
that you can have several lines of text as long as the
first column is empty.
.PP
Note that the continuation lines will all end up on the same
line in the html page. If you want linebreaks in the generated
html use the '\en' sequence.
.PP
The material will be added just before the </BODY> tag:
.PP
Example:
.PP
.Vb 2
\& PageFoot[ezwf]: Contact <A HREF="mailto:peter@x.yz">Peter</A>
\&  if you have questions regarding this page
.Ve
.Sh "AddHead"
.IX Subsection "AddHead"
Use this tag like the \fIPageTop\fR header, but its contents
will be added between </TITLE> and </HEAD>.
.PP
Example:
.PP
.Vb 1
\& AddHead[ezwf]: <link rev="made" href="mailto:mrtg@blabla.edu">
.Ve
.Sh "BodyTag"
.IX Subsection "BodyTag"
BodyTag lets you supply your very own <body ...> tag for the
generated webpages.
.PP
Example:
.PP
.Vb 2
\& BodyTag[ezwf]: <BODY LEFTMARGIN="1" TOPMARGIN="1" 
\&                      BACKGROUND="/stats/images/bg.neo2.gif">
.Ve
.Sh "AbsMax"
.IX Subsection "AbsMax"
If you are monitoring a link which can handle more traffic
than the \fIMaxBytes\fR value. Eg, a line which uses compression
or some frame relay link, you can use the \fIAbsMax\fR keyword
to give the absolute maximum value ever to be reached.
We need to know this in order to sort out unrealistic values
returned by the routers. If you do not set \fIAbsMax\fR, rateup
will ignore values higher than \fIMaxBytes\fR.
.PP
Example:
.PP
.Vb 1
\& AbsMax[ezwf]: 2500000
.Ve
.Sh "Unscaled"
.IX Subsection "Unscaled"
By default each graph is scaled vertically to make the
actual data visible even when it is much lower than
\&\fIMaxBytes\fR.  With the \fIUnscaled\fR variable you can suppress
this.  It's argument is a string, containing one letter
for each graph you don't want to be scaled: d=day w=week
m=month y=year.  In the example scaling for the
yearly and the monthly graph are suppressed.
.PP
Example:
.PP
.Vb 1
\& Unscaled[ezwf]: ym
.Ve
.Sh "WithPeak"
.IX Subsection "WithPeak"
By default the graphs only contain the average
values of the monitored variables \- normally the
transfer rates for incoming and outgoing traffic.
The following option instructs mrtg to display the peak
5 minute values in the [w]eekly, [m]onthly and
[y]early graph. In the example we define the monthly
and the yearly graph to contain peak as well as average
values.
.PP
Examples:
.PP
.Vb 1
\& WithPeak[ezwf]: ym
.Ve
.Sh "Suppress"
.IX Subsection "Suppress"
By default mrtg produces 4 graphs. With this option
you can suppress the generation of selected graphs.
The option value syntax is analogous to the above two options.
In this example we suppress the yearly graph
as it is quite empty in the beginning.
.PP
Example:
.PP
.Vb 1
\& Suppress[ezwf]: y
.Ve
.Sh "Extension"
.IX Subsection "Extension"
By default, mrtg creates .html files. Use this option to tell mrtg to
use a different extension. For example you could set the extension to
php3, then you will be able to enclose \s-1PHP\s0 tags into the output (usefull
for getting a router name out of a database).
.PP
Example:
.PP
.Vb 1
\& Extension[ezwf]: phtml
.Ve
.Sh "Directory"
.IX Subsection "Directory"
By default, mrtg puts all the files that it generates for each
target (the GIFs, the \s-1HTML\s0 page, the log file, etc.) in \fIWorkDir\fR.
.PP
If the \fIDirectory\fR option is specified, the files are instead put
into a directory under \fIWorkDir\fR or Log-, Image- and HtmlDir).
(For example the \fIDirectory\fR
option below would cause all the files for a target ezwf
to be put into directory /usr/tardis/pub/www/stats/mrtg/ezwf/ .)
.PP
The directory must already exist; mrtg will not create it.
.PP
Example:
.PP
.Vb 2
\& WorkDir: /usr/tardis/pub/www/stats/mrtg
\& Directory[ezwf]: ezwf
.Ve
\&\s-1NOTE:\s0 the Directory option must always be 'relative' or bad things will happen.
.Sh "XSize and YSize"
.IX Subsection "XSize and YSize"
By default mrtgs graphs are 100 by 400 pixels wide (plus
some more for the labels. In the example we get almost
square graphs ...
.PP
Note: XSize must be between 20 and 600; YSize must be larger than 20
.PP
Example:
.PP
.Vb 2
\& XSize[ezwf]: 300
\& YSize[ezwf]: 300
.Ve
.Sh "XZoom and YZoom"
.IX Subsection "XZoom and YZoom"
If you want your graphs to have larger pixels, you can
\&\*(L"Zoom\*(R" them.
.PP
Example:
.PP
.Vb 2
\& XZoom[ezwf]: 2.0
\& YZoom[ezwf]: 2.0
.Ve
.Sh "XScale and YScale"
.IX Subsection "XScale and YScale"
If you want your graphs to be actually scaled use \fIXScale\fR
and \fIYScale\fR. (Beware while this works, the results look ugly
(to be frank) so if someone wants to fix this: patches are welcome.
.PP
Example:
.PP
.Vb 2
\& XScale[ezwf]: 1.5
\& YScale[ezwf]: 1.5
.Ve
.Sh "YTics and YTicsFactor"
.IX Subsection "YTics and YTicsFactor"
If you want to show more than 4 lines per graph, use YTics.
If you want to scale the value used for the YLegend of these
tics, use YTicsFactor.
The default value for YTics is 4 and the default value for
YTicsFactor is 1.0 .
.PP
Example:
.PP
.Vb 4
\&  Suppose you get values ranging from 0 to 700.
\&  You want to plot 7 lines and want to show
\&  0, 1, 2, 3, 4, 5, 6, 7 instead of 0, 100, 200,
\&  300, 400, 500, 600, 700.  You should write then:
.Ve
.Vb 2
\&  YTics[ezwf]: 7
\&  YTicsFactor[ezwf]: 0.01
.Ve
.Sh "Factor"
.IX Subsection "Factor"
If you want to multiply all numbers shown below the graph with a constant factor, use
this directive to define it ..
.PP
Example:
.PP
.Vb 1
\&  Factor[as400]: 4096
.Ve
.Sh "Step"
.IX Subsection "Step"
Change the default step from 5 * 60 seconds to
something else (I have not tested this well ...)
.PP
Example:
.PP
.Vb 1
\& Step[ezwf]: 60
.Ve
.Sh "Options"
.IX Subsection "Options"
The \fIOptions\fR Keyword allows you to set some boolean
switches:
.Ip "growright" 4
.IX Item "growright"
The graph grows to the left by default.
This option flips the direction of growth
causing the current time to be at the right edge
of the graph and the history values to the left of it.
.Ip "bits" 4
.IX Item "bits"
All the monitored variable values are multiplied by 8
(i.e. shown in bits instead of bytes) ... looks much more impressive :\-)
It also affects the 'factory default' labeling and units
for the given target.
.Ip "perminute" 4
.IX Item "perminute"
All the monitored variable values are multiplied by 60
(i.e. shown in units per minute instead of units per second) in case
of small values more accurate graphs are displayed.
It also affects the 'factory default' labeling and units
for the given target.
.Ip "perhour" 4
.IX Item "perhour"
All the monitored variable values are multiplied by 3600
(i.e. shown in units per hour instead of units per second) in case
of small values more accurate graphs are displayed.
It also affects the 'factory default' labeling and units
for the given target.
.Ip "noinfo" 4
.IX Item "noinfo"
Suppress the information about uptime and
device name in the generated webpage.
.Ip "nopercent" 4
.IX Item "nopercent"
Don't print usage percentages
.Ip "transparent" 4
.IX Item "transparent"
make the background of the generated gifs transparent ...
.Ip "integer" 4
.IX Item "integer"
Print summary lines below graph as integers without comma
.Ip "dorelpercent" 4
.IX Item "dorelpercent"
The relative percentage of IN-traffic to OUT-traffic is calculated
and displayed in the graph as an additional line.
Note: Only a fixed scale is available (from 0 to 100%). Therefore
for IN-traffic greater than OUT-traffic also 100% is displayed.
If you suspect that your IN-traffic is not always less than or equal
to your OUT-traffic you are urged to not use this options.
Note: If you use this option in combination with the \fIColours\fR
options, a fifth colour-name colour-value pair is required there.
.Ip "gauge" 4
.IX Item "gauge"
Treat the values gathered from target as 'current status' measurements
and not as ever incrementing counters.
This would be useful to monitor things like disk space,
processor load, temperature, and the like ...
.Sp
In the absence of 'gauge' or 'absolute' options,
\&\s-1MRTG\s0 treats variable as a counter and calculates
the difference between the current and the previous value
and divides that by the elapsed time between
the last two readings to get the value to be plotted.
.Ip "absolute" 4
.IX Item "absolute"
This is for counter type data sources which reset their value when they are
read. This means that rateup does not have to build the difference between
the current and the last value read from the data source. The value obtained is
still divided by the elapsed time between the current and the last reading, which makes
it different from the 'gauge' option. Useful for external data gatherers.
.Ip "unknaszero" 4
.IX Item "unknaszero"
Log unknown data as zero instead of the default behaviour of repeating the
last value seen. Be careful with this, often a flat line in the graph is
much more obvious than a line at 0.
.Ip "withzeroes" 4
.IX Item "withzeroes"
Normally we ignore all values which are zero when calculating the average
transfer rate on a line. If this is not desirable use this option.
.Ip "noborder" 4
.IX Item "noborder"
If you are using rateup to log data, \s-1MRTG\s0 will create the graph images.
Normally these images have a shaded border around them. If you do not want the
border to be drawn, enable this option. This option has no effect if you are
not using rateup.
.Ip "noarrow" 4
.IX Item "noarrow"
As with the option above, this effects rateup graph generation only. Normally
rateup will generate graphs with a small arrow showing the direction of the
data. If you do not want this arrow to be drawn, enable this option. This
option has no effect if you are not using rateup.
.Ip "noi" 4
.IX Item "noi"
When using rateup for graph generation, you can use this option to stop rateup
drawing a graph for the 'I' or first variable. This also removes entries for
this variable in the \s-1HTML\s0 page \s-1MRTG\s0 generates, and will remove the peaks for
this variable if they are enabled. This allows you to hide this data, or can
be very useful if you are only graphing one line of data rather than two.
This option is not destructive \- any data received for the the variable
continued to be logged, it just isn't shown.
.Ip "noo" 4
.IX Item "noo"
Same as above, except relating to the 'O' or second variable.
.Ip "nobanner" 4
.IX Item "nobanner"
When using rateup for graph generation, this option disables \s-1MRTG\s0 adding the
\&\s-1MRTG\s0 banner to the \s-1HTML\s0 pages it generates.
.Ip "nolegend" 4
.IX Item "nolegend"
When using rateup for graph generation, this option will stop \s-1MRTG\s0 creating
a legend at the bottom of the \s-1HTML\s0 pages it generates.
.PP
Example:
.PP
.Vb 1
\& Options[ezwf]: growright, bits
.Ve
.Sh "kilo"
.IX Subsection "kilo"
Use this option to change the multiplier value for building
prefixes. Defaultvalue is 1000. This tag is for the special
case that 1kB = 1024B, 1MB = 1024kB and so far.
.PP
Example:
.PP
.Vb 1
\& kilo[ezwf]: 1024
.Ve
.Sh "kMG"
.IX Subsection "kMG"
Change the default multiplier prefixes (,k,M,G,T,P). In the tag
\&\fIShortLegend\fR define only the basic units.
Format: Comma seperated list of prefixed. Two consecutive commas
or a comma at start or end of the line gives no prefix on this item.
Note: If you do not want prefixes, then leave this line blank.
.PP
Example: velocity in nm/s (nanometers per second) displayed in nm/h.
.PP
.Vb 3
\& ShortLegend[ezwf]: m/min
\& kMG[ezwf]: n,u,m,,k,M,G,T,P
\& options[ezwf]: perhour
.Ve
.Sh "Colours"
.IX Subsection "Colours"
The \fIColours\fR tag allows you to override the default colour
scheme.  Note: All 4 of the required colours must be
specified here. The colour name ('Colourx' below) is the
legend name displayed, while the \s-1RGB\s0 value is the real
colour used for the display, both on the graph and in the
html doc.
.PP
Format is: Col1#RRGGBB,Col2#RRGGBB,Col3#RRGGBB,Col4#RRGGBB
.PP
Important:
If you use the \fIdorelpercent\fR options tag a fifth colour name
colour value pair is required:
Col1#RRGGBB,Col2#RRGGBB,Col3#RRGGBB,Col4#RRGGBB,Col5#RRGGBB
.Ip "Colour1" 4
.IX Item "Colour1"
First variable (normally Input) on default graph
.Ip "Colour2" 4
.IX Item "Colour2"
Second variable (normally Output) on default graph
.Ip "Colour3" 4
.IX Item "Colour3"
Max first variable (input)
.Ip "Colour4" 4
.IX Item "Colour4"
Max second variable (output)
.Ip "\s-1RRGGBB\s0" 4
.IX Item "RRGGBB"
2 digit hex values for Red, Green and Blue
.PP
Example:
.PP
.Vb 1
\& Colours[ezwf]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff
.Ve
.Sh "Background"
.IX Subsection "Background"
With the \fIBackground\fR tag you can configure the background
colour of the generated \s-1HTML\s0 page
.PP
Example:
.PP
.Vb 1
\& Background[ezwf]: #a0a0a0a
.Ve
.Sh "YLegend, ShortLegend, Legend[1234]"
.IX Subsection "YLegend, ShortLegend, Legend[1234]"
The following keywords allow you to override the text
displayed for the various legends of the graph and in the
\&\s-1HTML\s0 document
.Ip "YLegend" 4
.IX Item "YLegend"
The Y-axis label of the graph. Note that a text which is too long
to fit in the graph will be silently ignored.
.Ip "ShortLegend" 4
.IX Item "ShortLegend"
The units string (default 'b/s') used for Max, Average and Current
.Ip "Legend[1234IO]" 4
.IX Item "Legend[1234IO]"
The strings for the colour legend
.PP
Example:
.PP
.Vb 8
\&  YLegend[ezwf]: Bits per Second
\&  ShortLegend[ezwf]: b/s
\&  Legend1[ezwf]: Incoming Traffic in Bits per Second
\&  Legend2[ezwf]: Outgoing Traffic in Bits per Second
\&  Legend3[ezwf]: Maximal 5 Minute Incoming Traffic
\&  Legend4[ezwf]: Maximal 5 Minute Outgoing Traffic
\&  LegendI[ezwf]: &nbsp;In:
\&  LegendO[ezwf]: &nbsp;Out:
.Ve
Note, if \fILegendI\fR or \fILegendO\fR are set to an empty string with
.PP
.Vb 1
\& LegendO[ezwf]:
.Ve
The corresponding line below the graph will not be printed at all.
.Sh "Timezone"
.IX Subsection "Timezone"
If you live in an international world, you might want to
generate the graphs in different timezones. This is set in the
\&\s-1TZ\s0 variable. Under certain operating systems like Solaris,
this will provoke the localtime call to give the time in
the selected timezone ...
.PP
Example:
.PP
.Vb 1
\& Timezone[ezwf]: Japan
.Ve
The Timezone is the standard Solaris timezone, ie Japan, Hongkong,
\&\s-1GMT\s0, \s-1GMT+1\s0 etc etc.
.Sh "Weekformat"
.IX Subsection "Weekformat"
By default, mrtg (actually rateup) uses the \fIstrftime\fR\|(3) '%W' option
to format week numbers in the monthly graphs.  The exact semantics
of this format option vary between systems.  If you find that the
week numbers are wrong, and your system's \fIstrftime\fR\|(3) routine
supports it, you can try another format option.  The \s-1POSIX\s0 '%V'
option seems to correspond to a widely used week numbering
convention.  The week format character should be specified as a
single letter; either W, V, or U.
.PP
Example:
.PP
.Vb 1
\& Weekformat[ezwf]: V
.Ve
.Sh "SetEnv"
.IX Subsection "SetEnv"
When calling external scrits from withing your cfg file (Threshold or script
targets) you might want to pass some data on to the script. This can be done
with the SetEnv configuration option ... it takes a series of environment
variable assignments. Note that the quotes are mandatory.
.PP
Example:
.PP
.Vb 3
\& SetEnv[myrouter]:  EMAIL="contact_email@someplace.net"
\&                    HOST="www.some_server.net"
\&                    URL="http://www.some_server.net/path/mrtg.html"
.Ve
.SH "THRESHOLD CHECKING"
.IX Header "THRESHOLD CHECKING"
Through its threshold checking functionality mrtg is able to detect
threshold problems for the various targets and can call external
scripts to handle those problems (send email or a page to an administrator).
.PP
Threshold checking is configured through the following parameters:
.Sh "ThreshDir (\s-1GLOBAL\s0)"
.IX Subsection "ThreshDir (GLOBAL)"
By defining ThreshDir to point to a writable directory, \s-1MRTG\s0 will only alert
you when a threshold boundery has been crossed. 
.PP
Example:
.PP
.Vb 1
\& ThershDir: /var/mrtg/thresh
.Ve
.Sh "ThreshMinI  (\s-1PER\s0 \s-1TARGET\s0)"
.IX Subsection "ThreshMinI  (PER TARGET)"
This is the minimum acceptable value for the Input (first) parameter.  If
the parameter falls below this value, the program specified in ThreshProgI
will be run. If the value ends in '%' then the threshold is defined relative to MaxBytes.
.Sh "ThreshMaxI (\s-1PER\s0 \s-1TARGET\s0)"
.IX Subsection "ThreshMaxI (PER TARGET)"
This is the maximum acceptable value for the Input (first) parameter.  If
the parameter falls above this value, the program specified in ThreshProgI
will be run. If the value ends in '%' then the threshold is defined relative to MaxBytes.
.Sh "ThreshDesc (\s-1PER\s0 \s-1TARGET\s0)"
.IX Subsection "ThreshDesc (PER TARGET)"
Its value will be assigned to the environment variable \s-1THRESH_DESC\s0 before
any of the programs mentioned below are called. The programms can use the value
of this variable to produce more userfriendly output.
.Sh "ThreshProgI  (\s-1PER\s0 \s-1TARGET\s0)"
.IX Subsection "ThreshProgI  (PER TARGET)"
This defines a program to be run if ThreshMinI or ThreshMaxI is broken. 
\&\s-1MRTG\s0 passes 3 arguments: the \f(CW$router\fR variable, the threshold value
broken, and the current parameter value.
.Sh "ThreshProgOKI  (\s-1PER\s0 \s-1TARGET\s0)"
.IX Subsection "ThreshProgOKI  (PER TARGET)"
This defines a program to be run if the parameter is currently \s-1OK\s0 (based on
ThreshMinI and ThreshMaxI), but wasn't \s-1OK\s0 on the previous running \*(-- based
on the files found in ThreshDir. \s-1MRTG\s0 passes 3 arguments: the \f(CW$router\fR
variable the un-broken threshold value, and the current parameter value.
.Sh "ThreshMinO, ThreshMaxO, ThreshProgO, and ThreshProgOKO"
.IX Subsection "ThreshMinO, ThreshMaxO, ThreshProgO, and ThreshProgOKO"
They work the same as their *I counterparts, except on the Output (second)
parameter.
.PP
\&\fINote, that you can use the SetEnv parameter explained above to pass
additional information to the threshold programs.\fR
.SH "PER TARGET DEFAULT VALUES"
.IX Header "PER TARGET DEFAULT VALUES"
.Sh "Pre- and Postfix"
.IX Subsection "Pre- and Postfix"
To save yourself some typing you can define a target
called '^'. The text of every Keyword you define for this
target will be \s-1PREPENDED\s0 to the corresponding Keyword of
all the targets defined below this line. The same goes for
a Target called '$' but its text will be \s-1APPENDED\s0.
.PP
Note that a space is inserted between the prepended text
and the Keyword value, as well as between the Keyword value
and the appended text. This works well for text-valued Keywords,
but is not very useful for other Keywords. See the \*(L"default\*(R"
target description below.
.PP
The example will make mrtg use a common header and a
common contact person in all the pages generated from
targets defined later in this file.
.PP
Example:
.PP
.Vb 2
\& PageTop[^]: <H1>NoWhere Unis Traffic Stats</H1><HR>
\& PageTop[$]: Contact Peter Norton if you have any questions<HR>
.Ve
To remove the prepend/append value, specify an empty value, e.g.:
.PP
.Vb 2
\& PageTop[^]:
\& PageTop[$]:
.Ve
\&\s-1NOTE:\s0 With \s-1PREPEND\s0 and \s-1APPEND\s0 there is normally a space inserted between the local
value and the \s-1PRE-\s0 or \s-1APPEND\s0 value. Sometimes this is not desirable. You can
use the \fINoSpaceChar\fR config option to define a character which can be
mentioned at the end of a $ or ^ definition in order to supress the space.
.PP
Example:
.PP
.Vb 6
\&  NoSpaceChar: ~
\&  Target[^]: 1.3.6.1.4.1.482.50.2.4.20.0&1.3.6.1.4.1.482.50.2.4.21.0:get@~
\&  Target[a]: a.tolna.net
\&  Target[b]: b.tolna.net
\&  Target[c]: c.tolna.net
\&  Target[d]: d.tolna.net
.Ve
.Sh "Default Values"
.IX Subsection "Default Values"
The target name '_' specifies a default value for that
Keyword. In the absence of explicit Keyword value, the prepended
and the appended keyword value, the default value will be used.
.PP
Example:
.PP
.Vb 5
\& YSize[_]: 150
\& Options[_]: growright,bits,nopercent
\& WithPeak[_]: ymw
\& Suppress[_]: y
\& MaxBytes[_]: 1250000
.Ve
To remove the default value and return to the 'factory default',
specify an empty value, e.g.:
.PP
.Vb 1
\& YLegend[_]:
.Ve
There can be several instances of setting the default/prepend/append
values in the configuration file. The later setting replaces the
previous one for the rest of the configuration file.
The default/prepend/append values used for a given
keyword/target pair are the ones that were in effect
at the point in the configuration file where the target
was mentioned for the first time.
.PP
Example:
.PP
.Vb 4
\& MaxBytes[_]: 1250000
\& Target[myrouter.somplace.edu.2]: 2:public@myrouter.somplace.edu
\& MaxBytes[_]: 8000
\& Title[myrouter.somplace.edu.2]: Traffic Analysis for myrouter.somplace.edu IF 2
.Ve
The default \fIMaxBytes\fR for the target myrouter.somplace.edu.2
in the above example will be 1250000, which was in effect
where the target name myrouter.somplace.edu.2 first appeared
in the config file.
.SH "COMMAND LINE OPTIONS"
.IX Header "COMMAND LINE OPTIONS"
.Ip "\fB\*(--user\fR \fIusername\fR  and \fB\*(--group\fR \fIgroupname\fR" 4
.IX Item "user username  and group groupname"
Run as the given user and/or group. (Unix Only)
.Ip "\fB\*(--lock-file\fR \fIfilename\fR" 4
.IX Item "lock-file filename"
Use an alternate lock-file (the default is to use the configuration-file
appended with \f(CW\*(C`_l\*(C'\fR).
.Ip "\fB\*(--confcache-file\fR \fIfilename\fR" 4
.IX Item "confcache-file filename"
Use an alternate confcache-file (the default is to use the configuration-file appended with \f(CW\*(C`.ok\*(C'\fR)
.Ip "\fB\*(--logging\fR \fIfilename\fR|\fBeventlog\fR" 4
.IX Item "logging filename|eventlog"
If this is set to writable filename, all output from mrtg (warnings, debug messages, errors)
will go to \fIfilename\fR. If you are running on Win32 you can specify \fBeventlog\fR instead of a filename
which will send all error to the windows event log.
.Sp
\&\fB\s-1NOTE:\s0\fRNote, there is no Message \s-1DLL\s0 for mrtg which has the side effect
that the windows event logger will display a nice message with every entry
in the event log, complaing about the fact that mrtg has no message dll. If
any of the Windows folks want to contribute one, they are welcome.
.SH "EXAMPLES"
.IX Header "EXAMPLES"
.Sh "Minimal mrtg.cfg"
.IX Subsection "Minimal mrtg.cfg"
.Vb 5
\& WorkDir: /usr/tardis/pub/www/stats/mrtg
\& Target[r1]: 2:public@myrouter.somplace.edu
\& MaxBytes[r1]: 8000
\& Title[r1]: Traffic Analysis ISDN
\& PageTop[r1]: <H1>Stats for our ISDN Line</H1>
.Ve
.Sh "Cfg for several Routers."
.IX Subsection "Cfg for several Routers."
.Vb 6
\& WorkDir: /usr/tardis/pub/www/stats/mrtg
\& Title[^]: Traffic Analysis for
\& PageTop[^]: <H1>Stats for
\& PageTop[$]: Contact The Chief if you notice anybody<HR>
\& MaxBytes[_]: 8000
\& Options[_]: growright
.Ve
.Vb 3
\& Title[isdn]: our ISDN Line
\& PageTop[isdn]: our ISDN Line</H1>
\& Target[isdn]: 2:public@router.somplace.edu
.Ve
.Vb 4
\& Title[backb]: our Campus Backbone
\& PageTop[backb]: our Campus Backbone</H1>
\& Target[backb]: 1:public@router.somplace.edu
\& MaxBytes[backb]: 1250000
.Ve
.Vb 2
\& # the following line removes the default prepend value
\& # defined above
.Ve
.Vb 1
\& Title[^]:
.Ve
.Vb 3
\& Title[isdn2]: Traffic for the Backup ISDN Line
\& PageTop[isdn2]: our ISDN Line</H1>
\& Target[isdn2]: 3:public@router.somplace.edu
.Ve
.SH "AUTHOR"
.IX Header "AUTHOR"
Tobias Oetiker <oetiker@ee.ethz.ch> and many contributors