1MRTG-REFERENCE(1)                    mrtg                    MRTG-REFERENCE(1)
2
3
4

NAME

6       mrtg-reference - MRTG 2.17.4 configuration reference
7

OVERVIEW

9       The runtime behaviour of MRTG is governed by a configuration file.
10       Run-of-the-mill configuration files can be generated with cfgmaker.
11       (Check cfgmaker). But for more elaborate configurations some hand-
12       tuning is required.
13
14       This document describes all the configuration options understood by the
15       mrtg software.
16

SYNTAX

18       MRTG configuration file syntax follows some simple rules:
19
20       ·   Keywords must start at the beginning of a line.
21
22       ·   Lines which follow a keyword line which start with a blank are
23           appended to the keyword line
24
25       ·   Empty Lines are ignored
26
27       ·   Lines starting with a # sign are comments.
28
29       ·   You can add other files into the configuration file using
30
31           Include: file
32
33           Example:
34
35            Include: base-options.inc
36
37           If included files are specified with relative paths, both the
38           current working directory and the directory containing the main
39           config file will be searched for the files.  The current working
40           directory will be searched first.
41
42           If the included filename contains an asterisk, then this is taken
43           as a wildcard for zero or more characters, and all matching files
44           are included.  Thus, you can use this statement to include all
45           files in a specified subdirectory.
46
47           Example:
48
49            Include: servers/*.cfg
50
51           In this case, you should be very careful that your wildcard pattern
52           does not find a match relative to the current working directory if
53           you mean it to be relative to the main config file directory, since
54           the working directory is checked for a match first (as with a
55           normal Include directive).  Therefore, use of something like '*/*'
56           is discouraged.
57

GLOBAL KEYWORDS

59   WorkDir
60       WorkDir specifies where the logfiles and the webpages should be
61       created.
62
63       Example:
64
65        WorkDir: /usr/tardis/pub/www/stats/mrtg
66

OPTIONAL GLOBAL KEYWORDS

68   HtmlDir
69       HtmlDir specifies the directory where the html (or shtml, but we'll get
70       on to those later) lives.
71
72       NOTE: Workdir overrides the settings for htmldir, imagedir and logdir.
73
74       Example:
75
76        Htmldir: /www/mrtg/
77
78   ImageDir
79       ImageDir specifies the directory where the images live. They should be
80       under the html directory.
81
82       Example:
83
84        Imagedir: /www/mrtg/images
85
86   LogDir
87       LogDir specifies the directory where the logs are stored.  This need
88       not be under htmldir directive.
89
90       Example:
91
92        Logdir: /www/mrtg/logs
93
94   Forks (UNIX only)
95       With system that supports fork (UNIX for example), mrtg can fork itself
96       into multiple instances while it is acquiring data via snmp.
97
98       For situations with high latency or a great number of devices this will
99       speed things up considerably. It will not make things faster, though,
100       if you query a single switch sitting next door.
101
102       As far as I know NT can not fork so this option is not available on NT.
103
104       Example:
105
106        Forks: 4
107
108   EnableIPv6
109       When set to yes, IPv6 support is enabled if the required libraries are
110       present (see the mrtg-ipv6 manpage). When IPv6 is enabled, mrtg can
111       talk to routers using SNMP over IPv6 and targets may be specified by
112       their numeric IPv6 addresses as well as by hostname or IPv4 address.
113
114       If IPv6 is enabled and the target is a hostname, mrtg will try to
115       resolve the hostname to an IPv6 address and, if this fails, to an IPv4
116       address.  Note that mrtg will only use IPv4 if you specify an IPv4
117       address or a hostname with no corresponding IPv6 address; it will not
118       fall back to IPv4 if it simply fails to communicate with the target
119       using IPv6. This is by design.
120
121       Note that many routers do not currently support SNMP over IPv6. Use the
122       IPv4Only per target option for these routers.
123
124       IPv6 is disabled by default.
125
126       Example:
127
128        EnableIPv6: Yes
129
130   EnableSnmpV3
131       When set to yes, uses the Net::SNMP module instead of the SNMP_SESSION
132       module for generating snmp queries.  This allows the use of SNMPv3 if
133       other snmpv3 parameters are set.
134
135       SNMPv3 is disabled by default.
136
137       Example:
138
139        EnableSnmpV3: yes
140
141   Refresh
142       How many seconds apart should the browser (Netscape) be instructed to
143       reload the page? If this is not defined, the default is 300 seconds (5
144       minutes).
145
146       Example:
147
148        Refresh: 600
149
150   Interval
151       How often do you call mrtg? The default is 5 minutes. If you call it
152       less often, you should specify it here.  This does two things:
153
154       ·   The generated HTML page contains the right information about the
155           calling interval ...
156
157       ·   A META header in the generated HTML page will instruct caches about
158           the time-to-live of this page .....
159
160       In this example, we tell mrtg that we will be calling it every 10
161       minutes. If you are calling mrtg every 5 minutes, you can leave this
162       line commented out.
163
164       Example:
165
166        Interval: 10
167
168       Note that unless you are using rrdtool you can not set Interval to less
169       than 5 minutes. If you are using rrdtool you can set interval in the
170       format
171
172        Interval: MM[:SS]
173
174       Down to 1 second. Note though, setting the Interval for an rrdtool/mrtg
175       setup will influence the initial creation of the database. If you
176       change the interval later, all existing databases will remain at the
177       resolution they were initially created with. Also note that you must
178       make sure that your mrtg-rrd Web-frontend can deal with this kind of
179       Interval setting.
180
181   MaxAge
182       MRTG relies heavily on the real time clock of your computer. If the
183       time is set to a wrong value, especially if it is advanced far into the
184       future, this will cause mrtg to expire lots of supposedly old data from
185       the log files.
186
187       To prevent this, you can add a 'reasonability' check by specifying a
188       maximum age for log files. If a file seems to be older, mrtg will not
189       touch it but complain instead, giving you a chance to investigate the
190       cause.
191
192       Example:
193
194        MaxAge: 7200
195
196       The example above will make mrtg refuse to update log files older than
197       2 hours (7200 seconds).
198
199   WriteExpires
200       With this switch mrtg will generate .meta files for CERN and Apache
201       servers which contain Expiration tags for the html and gif files. The
202       *.meta files will be created in the same directory as the other files,
203       so you will have to set "MetaDir ." and "MetaFiles on" in your
204       apache.conf or .htaccess file for this to work
205
206       NOTE: If you are running Apache-1.2 or later, you can use the
207       mod_expire to achieve the same effect ... see the file htaccess.txt
208
209       Example:
210
211        WriteExpires: Yes
212
213   NoMib2
214       Normally we ask the SNMP device for 'sysUptime' and 'sysName'
215       properties.  Some do not have these. If you want to avoid getting
216       complaints from mrtg about these missing properties, specify the nomib2
217       option.
218
219       An example of agents which do not implement base mib2 attributes are
220       Computer Associates - Unicenter TNG Agents.  CA relies on using the
221       base OS SNMP agent in addition to its own agents to supplement the
222       management of a system.
223
224       Example:
225
226        NoMib2: Yes
227
228   SingleRequest
229       Some SNMP implementations can not deal with requests asking for
230       multiple snmp variables in one go. Set this in your cfg file to force
231       mrtg to only ask for one variable per request.
232
233       Examples
234
235        SingleRequest: Yes
236
237   SnmpOptions
238       Apart from the per target timeout options, you can also configure the
239       behaviour of the snmpget process on a more profound level. SnmpOptions
240       accepts a hash of options. The following options are currently
241       supported:
242
243        timeout                   => $default_timeout,
244        retries                   => $default_retries,
245        backoff                   => $default_backoff,
246        default_max_repetitions   => $max_repetitions,
247        use_16bit_request_ids     => 1,
248        lenient_source_port_matching => 0,
249        lenient_source_address_matching => 1
250
251       The values behind the options indicate the current default value.  Note
252       that these settings OVERRIDE the per target timeout settings.
253
254       A per-target SnmpOptions[] keyword will override the global settings.
255       That keyword is primarily for SNMPv3.
256
257       The 16bit request ids are the only way to query the broken SNMP
258       implementation of SMC Barricade routers.
259
260       Example:
261
262        SnmpOptions: retries => 2, only_ip_address_matching => 0
263
264       Note that AS/400 snmp seems to be broken in a way which prevents mrtg
265       from working with it unless
266
267        SnmpOptions: lenient_source_port_matching => 1
268
269       is set.
270
271   IconDir
272       If you want to keep the mrtg icons in someplace other than the working
273       (or imagedir) directory, use the IconDir variable for defining the url
274       of the icons directory.
275
276       Example:
277
278        IconDir: /mrtgicons/
279
280   LoadMIBs
281       Load the MIB file(s) specified and make its OIDs available as symbolic
282       names. For better efficiancy, a cache of MIBs is maintained in the
283       WorkDir.
284
285       Example:
286
287        LoadMIBs: /dept/net/mibs/netapp.mib,/usr/local/lib/ft100m.mib
288
289   Language
290       Switch output format to the selected Language (Check the translate
291       directory to see which languages are supported at the moment. In this
292       directory you can also find instructions on how to create new
293       translations).
294
295       Currently the following laguages are supported:
296
297       big5 brazilian bulgarian catalan chinese croatian czech danish dutch
298       eucjp french galician gb gb2312 german greek hungarian icelandic
299       indonesia iso2022jp italian korean lithuanian malay norwegian polish
300       portuguese romanian russian russian1251 serbian slovak slovenian
301       spanish swedish turkish ukrainian
302
303       Example:
304
305        Language: danish
306
307   LogFormat
308       Setting LogFormat to 'rrdtool' in your mrtg.cfg file enables rrdtool
309       mode.  In rrdtool mode, mrtg relies on rrdtool to do its logging. See
310       mrtg-rrd.
311
312       Example:
313
314        LogFormat: rrdtool
315
316   LibAdd
317       If you are using rrdtool mode and your rrdtool Perl module (RRDs.pm) is
318       not installed in a location where perl can find it on its own, you can
319       use LibAdd to supply an appropriate path.
320
321       Example:
322
323        LibAdd: /usr/local/rrdtool/lib/perl/
324
325   PathAdd
326       If the rrdtool executable can not be found in the normal "PATH", you
327       can use this keyword to add a suitable directory to your path.
328
329       Example:
330
331        PathAdd: /usr/local/rrdtool/bin/
332
333   RRDCached
334       If you are running RRDTool 1.4 or later with rrdcached, then you can
335       configure MRTG to take advantage of this for updates, either by using
336       the RRDCACHED_ADDRESS environment variable, or by setting the RRDCached
337       keyword in the configuration file.  Note that, if both are set, the
338       configuration file keyword will take precedence.
339
340       Only UNIX domain sockets are fully supported prior to RRDTool v1.5, and
341       you should note that using RRDCached mode will disable all Threshold
342       checking normally done by MRTG.  Appropriate warning messages will be
343       printed if necessary.
344
345       Examples:
346
347        RRDCached: unix:/var/tmp/rrdcached.sock
348
349        RRDCached: localhost:42217
350
351   RunAsDaemon
352       The RunAsDaemon keyword enables daemon mode operation. The purpose of
353       daemon mode is that MRTG is launched once and not repeatedly (as it is
354       with cron).  This behavior saves computing resourses as loading and
355       parsing of configuration files happens only once on startup, and if the
356       configuration file is modified.
357
358       Using daemon mode MRTG itself is responible for timing the measurement
359       intervals. Therfore its important to set the Interval keyword to an
360       apropiate value.
361
362       Note that when using daemon mode MRTG should no longer be started from
363       cron as each new process runs forever. Instead MRTG should be started
364       from the command prompt or by a system startup script.
365
366       If you want mrtg to run under a particular user and group (it is not
367       recomended to run MRTG as root) then you can use the --user=user_name
368       and --group=group_name options on the mrtg commandline.
369
370        mrtg --user=mrtg_user --group=mrtg_group mrtg.cfg
371
372       Also note that in daemon mode restarting the process is required in
373       order to activate changes in the config file.
374
375       Under UNIX, the Daemon switch causes mrtg to fork into background after
376       checking its config file. On Windows NT the MRTG process will detach
377       from the console, but because the NT/2000 shell waits for its children
378       you have to use this special start sequence when you launch the
379       program:
380
381        start /b perl mrtg mrtg.cfg
382
383       You may have to add path information equal to what you add when you run
384       mrtg from the commandline.
385
386       Example
387
388        RunAsDaemon: Yes
389        Interval:    5
390
391       This makes MRTG run as a daemon beginning data collection every 5
392       minutes
393
394       If you are daemontools and still want to run mrtg as a daemon you can
395       additionally specify
396
397        NoDetach:     Yes
398
399       this will make mrtg run but without detaching it from the terminal.
400
401       If the modification date on the configuration file changes during
402       operation, then MRTG will re-read the configuration on the next polling
403       cycle.  Note that sub-files which are included from the main
404       configuration do not have their modification times monitored, only the
405       top-level file is so checked.
406
407   ConversionCode
408       Some devices may produce non-numeric values that would nevertheless be
409       useful to graph with MRTG if those values could be converted to
410       numbers.  The ConversionCode keyword specifies the path to a file
411       containing Perl code to perform such conversions. The code in this file
412       must consist of one or more Perl subroutines. Each subroutine must
413       accept a single string argument and return a single numeric value. When
414       RRDtool is in use, a decimal value may be returned. When the name of
415       one of these subroutines is specified in a target definition (see
416       below), MRTG calls it twice for that target, once to convert the the
417       input value being monitored and a second time to convert the output
418       value. The subroutine must return an undefined value if the conversion
419       fails. In case of failure, a warning may be posted to the MRTG log file
420       using Perl's warn function. MRTG imports the subroutines into a
421       separate name space (package MRTGConversion), so the user need not
422       worry about pollution of MRTG's global name space. MRTG automatically
423       prepends this package declaration to the user-supplied code.
424
425       Example: Suppose a particular OID returns a character string whose
426       length is proportional to the value to be monitored. To convert this
427       string to a number that can be graphed by MRTG, create a file
428       arbitrarily named "MyConversions.pl" containing the following code:
429
430        # Return the length of the string argument
431        sub Length2Int {
432          my $value = shift;
433          return length( $value );
434        }
435
436       Then include the following global keyword in the MRTG configuration
437       file (assuming that the conversion code file is saved in the mrtg/bin
438       directory along with mrtg itself):
439
440        ConversionCode: MyConversions.pl
441
442       This will cause MRTG to include the definition of the subroutine
443       Length2Int in its execution environment. Length2Int can then be invoked
444       on any target by appending "|Length2Int" to the target definition as
445       follows:
446
447        Target[myrouter]: 1.3.6.1.4.1.999.1&1.3.6.1.4.1.999.1:public@mydevice|Length2Int
448
449       See "Extended Host Name Syntax" below for complete target definition
450       syntax information.
451

PER TARGET CONFIGURATION

453       Each monitoring target must be identified by a unique name. This name
454       must be appended to each parameter belonging to the same target. The
455       name will also be used for naming the generated webpages, logfiles and
456       images for this target.
457
458   Target
459       With the Target keyword you tell mrtg what it should monitor. The
460       Target keyword takes arguments in a wide range of formats:
461
462       Basic
463           The most basic format is "port:community@router" This will generate
464           a traffic graph for the interface 'port' of the host 'router' (dns
465           name or IP address) and it will use the community 'community' (snmp
466           password) for the snmp query.
467
468           Example:
469
470            Target[myrouter]: 2:public@wellfleet-fddi.domain
471
472           If your community contains a "@" or a " " these characters must be
473           escaped with a "\".
474
475            Target[bla]: 2:stu\ pi\@d@router
476
477       SNMPv2c
478           If you have a fast router you might want to try to poll the ifHC*
479           counters.  This feature gets activated by switching to SNMPv2c.
480           Unfortunately not all devices support SNMPv2c yet. If it works,
481           this will prevent your counters from wraping within the 5 minute
482           polling interval, since we now use 64 bit instead of the normal 32
483           bit.
484
485           Example:
486
487            Target[myrouter]: 2:public@router1:::::2
488
489       SNMPv3
490           As an alternative to SNMPv2c, SNMPv3 provides access to the ifHC*
491           counters, along with encryption.  Not all devices support SNMPv3,
492           and you will also need the perl Net::SNMP library in order to use
493           it.  It is recommended that cfgmaker be used to generate
494           configurations involving SNMPv3, as it will check if the Net::SNMP
495           library is loadable, and will switch to SNMPv2c if v3 is
496           unavailable.
497
498           SNMP v3 requires additional authentication parameters, passed using
499           the SnmpOptions[] per-target keyword.
500
501           Example:
502             Target[myrouter]: 2:router1:::::3
503             SnmpOptions[myrouter]: username=>'user1'
504
505       noHC
506           Not all routers that support SNMPv2 or SNMPv3 provide the ifHC*
507           counters on every interface.  The noHC[] per-target keyword signals
508           that the low-speed counters ifInOctets and ifOutOctets should be
509           queried instead.  cfgmaker will automatically insert this tag if
510           SNMPv2 or SNMPv3 is specified but the ifHC* counters are
511           unavailable.
512
513           Example:
514             Target[myrouter]: #Bri0:router1:::::3
515             SnmpOptions[myrouter]: username=>'user1'
516             noHC[myrouter]: yes
517
518       Reversing
519           Sometimes you are sitting on the wrong side of the link, and you
520           would like to have mrtg report Incoming traffic as Outgoing and
521           vice versa. This can be achieved by adding the '-' sign in front of
522           the "Target" description. It flips the incoming and outgoing
523           traffic rates.
524
525           Example:
526
527            Target[ezci]: -1:public@ezci-ether.domain
528
529       Explicit OIDs
530           You can also explicitly define which OID to query by using the
531           following syntax 'OID_1&OID_2:community@router' The following
532           example will retrieve error counts for input and output on
533           interface 1.  MRTG needs to graph two variables, so you need to
534           specify two OID's such as temperature and humidity or error input
535           and error output.
536
537           Example:
538
539            Target[myrouter]: 1.3.6.1.2.1.2.2.1.14.1&1.3.6.1.2.1.2.2.1.20.1:public@myrouter
540
541       MIB Variables
542           MRTG knows a number of symbolic SNMP variable names.  See the file
543           mibhelp.txt for a list of known names.  One example are the
544           ifInErrors and ifOutErrors.  This means you can specify the above
545           as:
546
547           Example:
548
549            Target[myrouter]: ifInErrors.1&ifOutErrors.1:public@myrouter
550
551       SnmpWalk
552           It may be that you want to monitor an snmp object that is only
553           reachable by 'walking'. You can get mrtg to walk by prepending the
554           OID with the string WaLK or if you want a particular entry from the
555           table returned by the walk you can use WaLKx where x is a number
556           starting from 0 (!).
557
558           Example:
559
560             Target[myrouter]: WaLKstrangeOid.1&WaLKstrangeOid.2:public@myrouter
561
562             Target[myrouter]: WaLK3strangeOid.1&WaLK4strangeOid.2:public@myrouter
563
564       SnmpGetNext
565           A special case of an snmp object that is only reachable by
566           'walking' occurs when a single snmpgetnext will return the correct
567           value, but snmpwalk fails.  This may occur with snmp V2 or V3, as
568           the snmpgetbulk method is used in these versions. You can get mrtg
569           to use getnext instead of getbulk by prepending the OID with the
570           string GeTNEXT.
571
572           Example:
573
574             Target[myrouter]: GeTNEXTstrangeOid&GeTNEXTstrangeOid:public@myrouter
575
576       Counted SNMP Walk
577           In other situations, an snmpwalk is needed to count rows, but the
578           actual data is uninteresting.  For example, counting the number of
579           mac-addresses in a CAM table, or the number of simultaneous dialup
580           sessions.  You can get MRTG to count the number of instances by
581           prepending the OID with the string CnTWaLK.  The following will
582           retrieve the number of simultaneous VOIP calls on some routers:
583
584           Example:
585
586              Target[myrouter]: CnTWaLK1.3.6.1.4.1.9.10.55.1.1.1.1.3&CnTWaLK1.3.6.1.4.1.9.10.55.1.1.1.1.3:public@myrouter
587
588       Interface by IP
589           Sometimes SNMP interface index can change, like when new interfaces
590           are added or removed. This can cause all Target entries in your
591           config file to become offset, causing MRTG to graphs wrong
592           instances etc.  MRTG supports IP address instead of ifindex in
593           target definition. Then MRTG will query snmp device and try to map
594           IP address to the current ifindex.  You can use IP addresses in
595           every type of target definition by adding IP address of the
596           numbered interface after OID and separation char '/'.
597
598           Make sure that the given IP address is used on your same target
599           router, especially when graphing two different OIDs and/or
600           interface split by '&' delimiter.
601
602           You can tell cfgmaker to generate such references with the option
603           --ifref=ip.
604
605           Example:
606
607            Target[myrouter]: /1.2.3.4:public@wellfleet-fddi.domain
608            Target[ezci]: -/1.2.3.4:public@ezci-ether.domain
609            Target[myrouter]: ifInErrors/1.2.3.4&ifOutErrors/1.2.3.4:public@myrouter
610
611       Interface by Description
612           If you can not use IP addresses you might want to use the interface
613           names. This works similar to the IP address aproach except that the
614           prefix to use is a \ instead of a /
615
616           You can tell cfgmaker to generate such references with the option
617           --ifref=descr.
618
619           Example:
620
621            Target[myrouter]: \My-Interface2:public@wellfleet-fddi.domain
622            Target[ezci]: -\My-Interface2:public@ezci-ether.domain
623            Target[myrouter]: ifInErrors\My-If2&ifOutErrors\My-If3:public@myrouter
624
625           If your description contains a "&", a ":", a "@" or a " " you can
626           include them but you must escape with a backlash:
627
628            Target[myrouter]: \fun\:\ ney\&ddd:public@hello.router
629
630       Interface by Name
631           This is the only sensible way to reference the interfaces of your
632           switches.
633
634           You can tell cfgmaker to generate such references with the option
635           --ifref=name.
636
637           Example:
638
639            Target[myrouter]: #2/11:public@wellfleet-fddi.domain
640            Target[ezci]: -#2/11:public@ezci-ether.domain
641            Target[myrouter]: ifInErrors#3/7&ifOutErrors#3/7:public@myrouter
642
643           If your description contains a "&", a ":", a "@" or a " " you can
644           include them but you must escape with a backlash:
645
646            Target[myrouter]: #\:\ fun:public@hello.router
647
648           Note that the # sign will be interpreted as a comment character if
649           it is the first non white-space character on the line.
650
651       Interface by Ethernet Address
652           When the SNMP interface index changes, you can key that interface
653           by its 'Physical Address', sometimes called a 'hard address', which
654           is the SNMP variable 'ifPhysAddress'.  Internally, MRTG matches the
655           Physical Address from the *.cfg file to its current index, and then
656           uses that index for the rest of the session.
657
658           You can use the Physical Address in every type of target definition
659           by adding the Physical Address after the OID and the separation
660           char '!' (analogous to the IP address option).  The Physical
661           address is specified as '-' delimited octets, such as
662           "0a-0-f1-5-23-18" (omit the double quotes). Note that some routers
663           use the same Hardware Ethernet Address for all of their Interfaces
664           which prevents unique interface identification. Mrtg will notice
665           such problems and alert you.
666
667           You can tell cfgmaker to generate configuration files with hardware
668           ethernet address references by using the option --ifref=eth.
669
670           Example:
671
672            Target[myrouter]: !0a-0b-0c-0d:public@wellfleet-fddi.domain
673            Target[ezci]: -!0-f-bb-05-71-22:public@ezci-ether.domain
674            Target[myrouter]: 1.3.6.1.2.1.2.2.1.14!0a-00-10-23-44-51& *BREAK*
675                       1.3.6.1.2.1.2.2.1.14!0a-00-10-23-44-51:public@myrouter
676            Target[myrouter]: ifInErrors!0a-00-10-23-44-51& *BREAK*
677                       ifOutErrors!0a-00-10-23-44-51:public@myrouter
678
679           Join the lines at *BREAK* ...
680
681       Interface by Type
682           It seems that there are devices that try to defy all monitoring
683           efforts: the interesting interfaces have neither ifName nor a
684           constant ifDescr not to mention a persistent ifIndex. The only way
685           to get a constant mapping is by looking at the interface type,
686           because the interface you are interested in is unique in the device
687           you are looking at ...
688
689           You can tell cfgmaker to generate such references with the option
690           --ifref=type.
691
692           Example:
693
694            Target[myrouter]: %13:public@wellfleet-fddi.domain
695            Target[ezci]: -%13:public@ezci-ether.domain
696            Target[myrouter]: ifInErrors%13&ifOutErrors%14:public@myrouter
697
698       Extended positioning of ifIndex
699           There are OIDs that contain the interface index at some inner
700           position within the OID. To use the above mentioned Interface by
701           IP/Description/Name/Type methods in the target definition the
702           keyword 'IndexPOS' can be used to indicate the position of ifIndex.
703           If 'IndexPOS' is not used the ifIndex will be appended at the end
704           of the OID.
705
706           Example:
707
708            Target[myrouter]: OID.IndexPOS.1/1.2.3.4&OID.IndexPOS.1/1.2.3.4:public@myrouter
709
710           Replace OID by your numeric OID.
711
712       Extended Host Name Syntax
713           In all places where ``community@router'' is accepted, you can add
714           additional parameters for the SNMP communication using colon-
715           separated suffixes. You can also append a pipe symbol ( | ) and the
716           name of a numeric conversion subroutine as described under the
717           global keyword "ConversionCode" above. The full syntax is as
718           follows:
719
720            community@router[:[port][:[timeout][:[retries][:[backoff][:[version]][|name]]]]]
721
722           where the meaning of each parameter is as follows:
723
724           port
725               the UDP port under which to contact the SNMP agent (default:
726               161)
727
728               The complete syntax of the port parameter is
729
730                remote_port[!local_address[!local_port]]
731
732               Some machines have additional security features that only allow
733               SNMP queries to come from certain IP addresses. If the host
734               doing the query has multiple interface, it may be necessary to
735               specify the interface the query should come from.
736
737               The port parameter allows the specification of the port of the
738               machine being queried. In addition, the IP address (or
739               hostname) and port of the machine doing the query may be
740               specified.
741
742               Examples:
743
744                somehost
745                somehost:161
746                somehost:161!192.168.2.4!4000 use 192.168.2.4 and port 4000 as source
747                somehost:!192.168.2.4 use 192.168.2.4 as source
748                somehost:!!4000 use port 4000 as source
749
750           timeout
751               initial timeout for SNMP queries, in seconds (default: 2.0)
752
753           retries
754               number of times a timed-out request will be retried (default:
755               5)
756
757           backoff
758               factor by which the timeout is multiplied on every retry
759               (default: 1.0).
760
761           version
762               for SNMP version. If you have a fast router you might want to
763               put a '2' here.  For authenticated or encrypted SNMP, you can
764               try to put a '3' here.  This will make mrtg try to poll the 64
765               bit counters and thus prevent excessive counter wrapping. Not
766               all routers support this though.  SNMP v3 requires additional
767               setup, see SnmpOptions[] for full details.
768
769               Example:
770
771                3:public@router1:::::2
772
773           name
774               the name of the subroutine that MRTG will call to convert the
775               input and output values to integers. See the complete example
776               under the global keyword "ConversionCode" above.
777
778               Example:
779
780                1.3.6.1.4.1.999.1&1.3.6.1.4.1.999.2:public@mydevice:161::::2|Length2Int
781
782               This would retrieve values from the OID 1.3.6.1.4.1.999.1 for
783               input and .2 for output on mydevice using UDP port 161 and SNMP
784               version 2, and would execute the user-defined numeric
785               conversion subroutine Length2Int to convert those values to
786               integers.
787
788           A value that equals the default value can be omitted.  Trailing
789           colons can be omitted, too. The pipe symbol followed by the name
790           parameter, if present, must come at the end. There must be no
791           spaces around the colons or pipe symbol.
792
793           Example:
794
795             Target[ezci]: 1:public@ezci-ether.domain:9161::4
796
797           This would refer to the input/output octet counters for the
798           interface with ifIndex 1 on ezci-ether.domain, as known by the SNMP
799           agent listening on UDP port 9161.  The standard initial timeout
800           (2.0 seconds) is used, but the number of retries is set to four.
801           The backoff value is the default.
802
803       Numeric IPv6 addresses
804           If IPv6 is enabled you may also specify a target using its IPv6
805           address. To avoid ambiguity with the port number, numeric IPv6
806           addresses must be placed in square brackets.
807
808           Example:
809
810            Target[IPv6test]: 2:public@[2001:760:4::]:6161::4
811
812       External Monitoring Scripts
813           If you want to monitor something which does not provide data via
814           snmp you can use some external program to do the data gathering.
815
816           The external command must return 4 lines of output:
817
818           Line 1
819               current state of the first variable, normally 'incoming bytes
820               count'
821
822           Line 2
823               current state of the second variable, normally 'outgoing bytes
824               count'
825
826           Line 3
827               string (in any human readable format), telling the uptime of
828               the target.
829
830           Line 4
831               string, telling the name of the target.
832
833           Depending on the type of data your script returns you might want to
834           use the 'gauge' or 'absolute' arguments for the Options keyword.
835
836           Example:
837
838            Target[myrouter]: `/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0`
839
840           Note the use of the backticks (`), not apostrophes (') around the
841           command.
842
843           If you want to use a backtick in the command name this can be done
844           but you must escape it with a backslash ...
845
846           If your script does not have any data to return but does not want
847           mrtg to complain about invalid data, it can return 'UNKNOWN'
848           instead of a number.  Note though that only rrdtool is realy
849           equipped to handle unknown data well.
850
851       Multi Target Syntax
852           You can also combine several target definitions in a mathematical
853           expression.  Any syntactically correct expression that the Perl
854           interpreter can evaluate to will work. An expression could be used,
855           for example, to aggregate both B channels in an ISDN connection or
856           to calculate the percentage hard disk utilization of a server from
857           the absolute used space and total capacity.
858
859           Examples:
860
861            Target[myrouter]: 2:public@wellfleetA + 1:public@wellfleetA
862
863            Target[myrouter]: .1.3.6.1.4.1.999.1&.1.3.6.1.4.1.999.2:public@mydevice /
864                .1.3.6.1.4.1.999.3&.1.3.6.1.4.1.999.4:public@mydevice * 100
865
866           Note that whitespace must surround each target definition in the
867           expression.  Target definitions themselves must not contain
868           whitespace, except in interface descriptions and interface names,
869           where each whitespace character is escaped by a backslash.
870
871           MRTG automatically rounds the result of the expression to an
872           integer unless RRDTool logging is in use and the gauge option is in
873           effect for the target.  Internally MRTG uses Perl's Math::BigFloat
874           package to calculate the result of the expression with 40 digits of
875           precision. Even in extreme cases, where, for example, you take the
876           difference of two 64-bit integers, the result of the expression
877           should be accurate.
878
879       SNMP Request Optimization
880           MRTG is designed to economize on its SNMP requests. Where a target
881           definition appears more than once in the configuration file, MRTG
882           requests the data from the device only once per round of data
883           collection and uses the collected data for each instance of a
884           particular target. Recognition of two target definitions as being
885           identical is based on a simple string match rather than any kind of
886           deeper semantic analysis.
887
888           Example:
889
890            Target[Targ1]: 1:public@CiscoA
891            Target[Targ2]: 2:public@CiscoA
892            Target[Targ3]: 1:public@CiscoA + 2:public@CiscoA
893            Target[Targ4]: 1:public@CISCOA
894
895           This results in a total of three SNMP requests. Data for
896           1:public@CiscoA and 2:public@CiscoA are requested only once each,
897           and used for Targ1, Targ2, and Targ3. Targ4 causes another SNMP
898           request for 1:public@CISCOA, which is not recognized as being
899           identical to 1:public@CiscoA.
900
901   MaxBytes
902       The maximum value either of the two variables monitored are allowed to
903       reach. For monitoring router traffic this is normally the bytes per
904       second this interface port can carry.
905
906       If a number higher than MaxBytes is returned, it is ignored.  Also read
907       the section on AbsMax for further info.  The MaxBytes value is also
908       used in calculating the Y range for unscaled graphs (see the section on
909       Unscaled).
910
911       Since most links are rated in bits per second, you need to divide their
912       maximum bandwidth (in bits) by eight (8) in order to get bytes per
913       second.  This is very important to make your unscaled graphs display
914       realistic information. T1 = 193000, 56K = 7000, 10 MB Ethernet =
915       1250000, 100 MB Ethernet = 12500000. The MaxBytes value will be used by
916       mrtg to decide whether it got a valid response from the router.
917
918       If you need two different MaxBytes values for the two monitored
919       variables, you can use MaxBytes1 and MaxBytes2 instead of MaxBytes.
920
921       Example:
922
923        MaxBytes[myrouter]: 1250000
924
925   Title
926       Title for the HTML page which gets generated for the graph.
927
928       Example:
929
930        Title[myrouter]: Traffic Analysis for Our Nice Company
931

OPTIONAL PER TARGET KEYWORDS

933   PageTop
934       Things to add to the top of the generated HTML page.  Note that you can
935       have several lines of text as long as the first column is empty.
936
937       Note that the continuation lines will all end up on the same line in
938       the html page. If you want linebreaks in the generated html use the
939       '\n' sequence.
940
941       Example:
942
943        PageTop[myrouter]: <H1>Traffic Analysis for ETZ C95.1</H1>
944          Our Campus Backbone runs over an FDDI line\n
945          with a maximum transfer rate of 12.5 megabytes per
946          Second.
947
948   RouterUptime
949       In cases where you calculate the used bandwidth from several interfaces
950       you normally don't get the router uptime and router name displayed on
951       the web page.
952
953       If these interfaces are on the same router and the uptime and name
954       should be displayed you have to specify its community and address again
955       with the RouterUptime keyword.
956
957       If you want to use a special OID for querying the router uptime, use
958       prepend the oid.
959
960       Example:
961
962        Target[kacisco.comp.edu]: 1:public@194.64.66.250 + 2:public@194.64.66.250
963        RouterUptime[kacisco.comp.edu]: public@194.64.66.250
964
965        RouterUptime[kacisco.comp.edu]: hrSystemUptime.0:public@194.64.66.250
966
967   RouterName
968       If the default name of the router is incorrect/uninformative, you can
969       use RouterName to specify a different OID on either the same or a
970       different host.
971
972       A practical example: sysName on BayTech DS72 units always display
973       "ds72", no matter what you set the Unit ID to be.  Instead, the Unit ID
974       is stored at 1.3.6.1.4.1.4779.1.1.3.0, so we can have MRTG display this
975       instead of sysName.
976
977       Example:
978
979        RouterName[kacisco.comp.edu]: 1.3.6.1.4.1.4779.1.1.3.0
980
981       A different OID on a different host can also be specified:
982
983        RouterName[kacisco.comp.edu]: 1.3.6.1.4.1.4779.1.1.3.0:public@194.64.66.251
984
985   MaxBytes1
986       Same as MaxBytes, for variable 1.
987
988   MaxBytes2
989       Same as MaxBytes, for variable 2.
990
991   IPv4Only
992       Many IPv6 routers do not currently support SNMP over IPv6 and must be
993       monitored using IPv4. The IPv4Only option forces mrtg to use IPv4 when
994       communicating with the target, even if IPv6 is enabled. This is useful
995       if the target is a hostname with both IPv4 and IPv6 addresses; without
996       the IPv4Only keyword, monitoring such a router will not work if IPv6 is
997       enabled.
998
999       If set to no (the default), mrtg will use IPv6 unless the target has no
1000       IPv6 addresses, in which case it will use IPv4. If set to yes, mrtg
1001       will only use IPv4.
1002
1003       Note that if this option is set to yes and the target does not have an
1004       IPv4 address, communication with the target will fail.
1005
1006       This option has no effect if IPv6 is not enabled.
1007
1008       Example:
1009
1010        Target[v4onlyrouter_1]: 1:public@v4onlyrouter
1011        IPv4Only[v4onlyrouter_1]: Yes
1012
1013   SnmpOptions (V3)
1014       SNMPv3 requires a fairly rich set of options.  This per-target keyword
1015       allows access to the User Security Model of SNMPv3.  Options are listed
1016       in the same syntax as a perl hash.
1017
1018       Security Modes
1019
1020       SNMPv3 has three security modes, defined on the device being polled.
1021       For example, on Cisco routers the security mode is defined by the snmp-
1022       server group global configuration command.
1023
1024       NoAuthNoPriv
1025           Neither Authentication nor Privacy is defined.  Only the Username
1026           option is specified for this mode.
1027
1028           Example:
1029
1030            SnmpOptions[myrouter]: username=>'user1'
1031
1032       AuthNoPriv
1033           Uses a Username and a password.  The password can be hashed using
1034           the snmpkey application, or passed in plain text along with the
1035           ContextEngineID
1036
1037           Example:
1038
1039            SnmpOptions[myrouter]: username=>'user1',authpassword=>'example',
1040              contextengineid=>'80000001110000004000000'
1041
1042       Priv
1043           Both Authentication and Privacy is defined.  The default privacy
1044           protocol is des.
1045
1046           Example:
1047            SnmpOptions[myrouter]:
1048           authkey=>'0x1e93ab5a396e2af234c8920e61cfe2028072c0e2',
1049              authprotocol=>'sha',privprotocol=>'des',username=>'user1',
1050              privkey=>'0x498d74940c5872ed387201d74b9b25e2'
1051
1052       snmp options
1053
1054       The following option keywords are recognized:
1055
1056       username
1057           The user associated with the User Security Model
1058
1059       contextname
1060           An SNMP agent can define multiple contexts.  This keyword allows
1061           them to be polled.
1062
1063       contextengineid
1064           A unique 24-byte string identifying the snmp-agent.
1065
1066       authpassword
1067           The plaintext password for a user in either AuthNoPriv or Priv
1068           mode.
1069
1070       authkey
1071           A md5 or sha hash of the plain-text password, along with the
1072           engineid.  Use the snmpkey commandline program to generate this
1073           hash, or use Net::SNMP::Security::USM in a script.
1074
1075       authprotocol {sha|md5}
1076           The hashing algorithm defined on the SNMP client.  Defaults to md5.
1077
1078       privpassword
1079           A plaintext pre-shared key for encrypting snmp packets in Priv
1080           mode.
1081
1082       privkey
1083           A hash of the plain-text pre-shared key, along with the engineid.
1084           Use the snmpkey commandline program to generate this hash, or use
1085           Net::SNMP::Security::USM in a script.
1086
1087       privprotocol {des|3desede|aescfb128|aescfb192|aescfb256}
1088           Specifies the encryption method defined on the snmp agent.  The
1089           default is des.
1090
1091   PageFoot
1092       Things to add to the bottom of the generated HTML page.  Note that you
1093       can have several lines of text as long as the first column is empty.
1094
1095       Note that the continuation lines will all end up on the same line in
1096       the html page. If you want linebreaks in the generated html use the
1097       '\n' sequence.
1098
1099       The material will be added just before the </BODY> tag:
1100
1101       Example:
1102
1103        PageFoot[myrouter]: Contact <A HREF="mailto:peter@x.yz">Peter</A>
1104         if you have questions regarding this page
1105
1106   AddHead
1107       Use this tag like the PageTop header, but its contents will be added
1108       between </TITLE> and </HEAD>.
1109
1110       Example:
1111
1112        AddHead[myrouter]: <link rev="made" href="mailto:mrtg@blabla.edu">
1113
1114   BodyTag
1115       BodyTag lets you supply your very own <body ...> tag for the generated
1116       webpages.
1117
1118       Example:
1119
1120        BodyTag[myrouter]: <BODY LEFTMARGIN="1" TOPMARGIN="1"
1121                             BACKGROUND="/stats/images/bg.neo2.gif">
1122
1123   AbsMax
1124       If you are monitoring a link which can handle more traffic than the
1125       MaxBytes value. Eg, a line which uses compression or some frame relay
1126       link, you can use the AbsMax keyword to give the absolute maximum value
1127       ever to be reached. We need to know this in order to sort out
1128       unrealistic values returned by the routers. If you do not set AbsMax,
1129       rateup will ignore values higher than MaxBytes.
1130
1131       Example:
1132
1133        AbsMax[myrouter]: 2500000
1134
1135   Unscaled
1136       By default each graph is scaled vertically to make the actual data
1137       visible even when it is much lower than MaxBytes.  With the Unscaled
1138       variable you can suppress this.  It's argument is a string, containing
1139       one letter for each graph you don't want to be scaled: d=day w=week
1140       m=month y=year.  There is also a special case to unset the variable
1141       completely: n=none. This could be useful in the event you need to
1142       override a global configuration. In the example scaling for the yearly
1143       and the monthly graph are suppressed.
1144
1145       Example:
1146
1147        Unscaled[myrouter]: ym
1148
1149   WithPeak
1150       By default the graphs only contain the average values of the monitored
1151       variables - normally the transfer rates for incoming and outgoing
1152       traffic.  The following option instructs mrtg to display the peak 5
1153       minute values in the [w]eekly, [m]onthly and [y]early graph. In the
1154       example we define the monthly and the yearly graph to contain peak as
1155       well as average values.
1156
1157       Examples:
1158
1159        WithPeak[myrouter]: ym
1160
1161   Suppress
1162       By default mrtg produces 4 graphs. With this option you can suppress
1163       the generation of selected graphs.  The option value syntax is
1164       analogous to the above two options.  In this example we suppress the
1165       yearly graph as it is quite empty in the beginning.
1166
1167       Example:
1168
1169        Suppress[myrouter]: y
1170
1171   Extension
1172       By default, mrtg creates .html files. Use this option to tell mrtg to
1173       use a different extension. For example you could set the extension to
1174       php3, then you will be able to enclose PHP tags into the output (useful
1175       for getting a router name out of a database).
1176
1177       Example:
1178
1179        Extension[myrouter]: phtml
1180
1181   Directory
1182       By default, mrtg puts all the files that it generates for each target
1183       (the GIFs, the HTML page, the log file, etc.) in WorkDir.
1184
1185       If the Directory option is specified, the files are instead put into a
1186       directory under WorkDir or Log-, Image- and HtmlDir).  (For example the
1187       Directory option below would cause all the files for a target myrouter
1188       to be put into directory /usr/tardis/pub/www/stats/mrtg/myrouter/ .)
1189
1190       The directory must already exist; mrtg will not create it.
1191
1192       Example:
1193
1194        WorkDir: /usr/tardis/pub/www/stats/mrtg
1195        Directory[myrouter]: myrouter
1196
1197       NOTE: the Directory option must always be 'relative' or bad things will
1198       happen.
1199
1200   Clonedirectory
1201       If the Directory option is specified, the Clonedirectory option will
1202       copy all the contents of Directory to the Clonedirectory.
1203
1204       Example:
1205
1206        WorkDir: /usr/tardis/pub/www/stats/mrtg
1207        Directory[myrouter]: myrouter
1208        Clonedirectory[myrouter]: myclonedirectory
1209
1210       Optionally the target name can be changed in the cloning process.
1211
1212       Example:
1213
1214        WorkDir: /usr/tardis/pub/www/stats/mrtg
1215        Directory[myrouter]: myrouter
1216        Clonedirectory[myrouter]: myclonedirectory mynewtarget
1217
1218       NOTE1: The clone directory must already exist; mrtg will not create it.
1219
1220       NOTE2: The Clonedirectory option must also always be 'relative' or bad
1221       things will happen.
1222
1223       NOTE3: This requires the File::Copy module
1224
1225   XSize and YSize
1226       By default mrtgs graphs are 100 by 400 pixels wide (plus some more for
1227       the labels. In the example we get almost square graphs ...
1228
1229       Note: XSize must be between 20 and 600; YSize must be larger than 20
1230
1231       Example:
1232
1233        XSize[myrouter]: 300
1234        YSize[myrouter]: 300
1235
1236   XZoom and YZoom
1237       If you want your graphs to have larger pixels, you can "Zoom" them.
1238
1239       Example:
1240
1241        XZoom[myrouter]: 2.0
1242        YZoom[myrouter]: 2.0
1243
1244   XScale and YScale
1245       If you want your graphs to be actually scaled use XScale and YScale.
1246       (Beware: while this works, the results look ugly (to be frank) so if
1247       someone wants to fix this: patches are welcome.
1248
1249       Example:
1250
1251        XScale[myrouter]: 1.5
1252        YScale[myrouter]: 1.5
1253
1254   YTics and YTicsFactor
1255       If you want to show more than 4 lines per graph, use YTics.  If you
1256       want to scale the value used for the YLegend of these tics, use
1257       YTicsFactor.  The default value for YTics is 4 and the default value
1258       for YTicsFactor is 1.0 .
1259
1260       Example:
1261
1262       Suppose you get values ranging from 0 to 700.  You want to plot 7 lines
1263       and want to show 0, 1, 2, 3, 4, 5, 6, 7 instead of 0, 100, 200, 300,
1264       400, 500, 600, 700.  You should write then:
1265
1266         YTics[myrouter]: 7
1267         YTicsFactor[myrouter]: 0.01
1268
1269   Factor
1270       If you want to multiply all numbers shown below the graph with a
1271       constant factor, use this directive to define it ..
1272
1273       Example:
1274
1275         Factor[as400]: 4096
1276
1277   Step
1278       Change the default step from 5 * 60 seconds to something else (I have
1279       not tested this much ...)
1280
1281       Example:
1282
1283        Step[myrouter]: 60
1284
1285   PNGTitle
1286       When using rateup for graph generation, this will print the given title
1287       in the graph it generates.
1288
1289       Example:
1290
1291        PNGTitle[myrouter]: WAN Link UK-US
1292
1293   Options
1294       The Options Keyword allows you to set some boolean switches:
1295
1296       growright
1297           The graph grows to the left by default.  This option flips the
1298           direction of growth causing the current time to be at the right
1299           edge of the graph and the history values to the left of it.
1300
1301       bits
1302           All the monitored variable values are multiplied by 8 (i.e. shown
1303           in bits instead of bytes) ... looks much more impressive :-) It
1304           also affects the 'factory default' labeling and units for the given
1305           target.
1306
1307       perminute
1308           All the monitored variable values are multiplied by 60 (i.e. shown
1309           in units per minute instead of units per second) in case of small
1310           values more accurate graphs are displayed.  It also affects the
1311           'factory default' labeling and units for the given target.
1312
1313       perhour
1314           All the monitored variable values are multiplied by 3600 (i.e.
1315           shown in units per hour instead of units per second) in case of
1316           small values more accurate graphs are displayed.  It also affects
1317           the 'factory default' labeling and units for the given target.
1318
1319       noinfo
1320           Suppress the information about uptime and device name in the
1321           generated webpage.
1322
1323       nopercent
1324           Don't print usage percentages.
1325
1326       transparent
1327           Make the background of the generated gifs transparent.
1328
1329       integer
1330           Print summary lines below graph as integers without commas.
1331
1332       dorelpercent
1333           The relative percentage of IN-traffic to OUT-traffic is calculated
1334           and displayed in the graph as an additional line.  Note: Only a
1335           fixed scale is available (from 0 to 100%). Therefore if IN-traffic
1336           is greater than OUT-traffic then 100% is displayed.  If you suspect
1337           that your IN-traffic is not always less than or equal to your OUT-
1338           traffic you are urged to not use this options.  Note: If you use
1339           this option in combination with the Colours options, a fifth
1340           colour-name colour-value pair is required there.
1341
1342       avgpeak
1343           There are some ISPs who use the average Peak values to bill their
1344           customers.  Using this option MRTG displays these values for each
1345           graph. The value is built by averaging the max 5 minute traffic
1346           average for each 'step' shown in the graph. For the Weekly graph
1347           this means that it builds the average of all 2 hour intervals 5
1348           minute peak values. (Confused? Thought so!)
1349
1350       gauge
1351           Treat the values gathered from target as 'current status'
1352           measurements and not as ever incrementing counters.  This would be
1353           useful to monitor things like disk space, processor load,
1354           temperature, and the like ...
1355
1356           In the absence of 'gauge' or 'absolute' options, MRTG treats
1357           variables as a counters and calculates the difference between the
1358           current and the previous value and divides that by the elapsed time
1359           between the last two readings to get the value to be plotted.
1360
1361       absolute
1362           This is for counter type data sources which reset their value when
1363           they are read. This means that rateup does not have to build the
1364           difference between the current and the last value read from the
1365           data source. The value obtained is still divided by the elapsed
1366           time between the current and the last reading, which makes it
1367           different from the 'gauge' option. Useful for external data
1368           gatherers.
1369
1370       derive
1371           If you are using rrdtool as logger/grapher you can use a third type
1372           of data source. Derive is like counter, except that it is not
1373           required to go UP all the time. It is useful for situations where
1374           the change of some value should be graphed.
1375
1376       unknaszero
1377           Log unknown data as zero instead of the default behaviour of
1378           repeating the last value seen. Be careful with this, often a flat
1379           line in the graph is much more obvious than a line at 0.
1380
1381       withzeroes
1382           Normally we ignore all values which are zero when calculating the
1383           average transfer rate on a line. If this is not desirable use this
1384           option.
1385
1386       noborder
1387           If you are using rateup to log data, MRTG will create the graph
1388           images.  Normally these images have a shaded border around them. If
1389           you do not want the border to be drawn, enable this option. This
1390           option has no effect if you are not using rateup.
1391
1392       noarrow
1393           As with the option above, this effects rateup graph generation
1394           only. Normally rateup will generate graphs with a small arrow
1395           showing the direction of the data. If you do not want this arrow to
1396           be drawn, enable this option. This option has no effect if you are
1397           not using rateup.
1398
1399       noi When using rateup for graph generation, you can use this option to
1400           stop rateup drawing a graph for the 'I' or first variable. This
1401           also removes entries for this variable in the HTML page MRTG
1402           generates, and will remove the peaks for this variable if they are
1403           enabled. This allows you to hide this data, or can be very useful
1404           if you are only graphing one line of data rather than two.  This
1405           option is not destructive - any data received for the the variable
1406           continued to be logged, it just isn't shown.
1407
1408       noo Same as above, except relating to the 'O' or second variable.
1409
1410       nobanner
1411           When using rateup for graph generation, this option disables MRTG
1412           adding the MRTG banner to the HTML pages it generates.
1413
1414       nolegend
1415           When using rateup for graph generation, this option will stop MRTG
1416           from creating a legend at the bottom of the HTML pages it
1417           generates.
1418
1419       printrouter
1420           When using rateup for graph generation, this option will print the
1421           router name in the graph it generates.  This option is overridden
1422           by the value of PNGTitle if one is given
1423
1424       pngdate
1425           When using rateup for graph generation, this option will print a
1426           timestamp in the graph it generates, including a timezone if one is
1427           specified by the 'Timezone' parameter. This is aequivalent to
1428           setting TimeStrPost[x]: RU
1429
1430       logscale
1431           The logscale option causes rateup to display the data with the Y
1432           axis scaled logarithmically.  Doing so allows the normal traffic to
1433           occupy the majority of the vertical range, while still showing any
1434           spikes at their full height.
1435
1436           logscale displays all the available data and will always produce
1437           well-behaved graphs.  People often consider a logarithmically
1438           scaled graph counterintuitive, however, and thus hard to interpret.
1439
1440       expscale
1441           The expscale option causes rateup to display the data with the Y
1442           axis scaled exponentially.  Doing so emphasizes small changes at
1443           the top of the scale; this can be useful when graphing values that
1444           fluctuate by a small amount near the top of the scale, such as line
1445           voltage.
1446
1447           expscale is essentially the inverse of logscale.
1448
1449       secondmean
1450           The secondmean option sets the maximum value on the graph to the
1451           mean of the data greater than the mean of all data.  This produces
1452           a graph that focuses more on the typical data, while clipping large
1453           peaks.
1454
1455           Using secondmean will give a more intutive linearly scaled graph,
1456           but can result in a uselessly high or low scale in some rare
1457           situations (specifically, when the data includes a large portion of
1458           values far from the actual mean)
1459
1460           If a target includes both logscale and secondmean in the options,
1461           the secondmean takes precedence.
1462
1463       Example:
1464
1465        Options[myrouter]: growright, bits
1466
1467   kilo
1468       Use this option to change the multiplier value for building prefixes.
1469       Defaultvalue is 1000. This tag is for the special case that 1kB =
1470       1024B, 1MB = 1024kB and so far.
1471
1472       Example:
1473
1474        kilo[myrouter]: 1024
1475
1476   kMG
1477       Change the default multiplier prefixes (,k,M,G,T,P). In the tag
1478       ShortLegend define only the basic units.  Format: Comma separated list
1479       of prefixed. Two consecutive commas or a comma at start or end of the
1480       line gives no prefix on this item.  If you do not want prefixes, just
1481       put two consecutive commas.  If you want to skip a magnitude select '-'
1482       as value.
1483
1484       Example: velocity in nm/s (nanometers per second) displayed in nm/h.
1485
1486        ShortLegend[myrouter]: m/h
1487        kMG[myrouter]: n,u,m,,k,M,G,T,P
1488        options[myrouter]: perhour
1489
1490   Colours
1491       The Colours tag allows you to override the default colour scheme.
1492       Note: All 4 of the required colours must be specified here. The colour
1493       name ('Colourx' below) is the legend name displayed, while the RGB
1494       value is the real colour used for the display, both on the graph and in
1495       the html doc.
1496
1497       Format is: Col1#RRGGBB,Col2#RRGGBB,Col3#RRGGBB,Col4#RRGGBB
1498
1499       Important: If you use the dorelpercent options tag a fifth colour name
1500       colour value pair is required:
1501       Col1#RRGGBB,Col2#RRGGBB,Col3#RRGGBB,Col4#RRGGBB,Col5#RRGGBB
1502
1503       Colour1
1504           First variable (normally Input) on default graph.
1505
1506       Colour2
1507           Second variable (normally Output) on default graph.
1508
1509       Colour3
1510           Max first variable (input).
1511
1512       Colour4
1513           Max second variable (output).
1514
1515       RRGGBB
1516           2 digit hex values for Red, Green and Blue.
1517
1518       Example:
1519
1520        Colours[myrouter]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff
1521
1522   Background
1523       With the Background tag you can configure the background colour of the
1524       generated HTML page.
1525
1526       Example:
1527
1528        Background[myrouter]: #a0a0a0a
1529
1530   YLegend, ShortLegend, Legend[1234]
1531       The following keywords allow you to override the text displayed for the
1532       various legends of the graph and in the HTML document:
1533
1534       YLegend
1535           The Y-axis label of the graph. Note that a text which is too long
1536           to fit in the graph will be silently ignored.
1537
1538       ShortLegend
1539           The units string (default 'b/s') used for Max, Average and Current
1540
1541       Legend[1234IO]
1542           The strings for the colour legend.
1543
1544       Example:
1545
1546         YLegend[myrouter]: Bits per Second
1547         ShortLegend[myrouter]: b/s
1548         Legend1[myrouter]: Incoming Traffic in Bits per Second
1549         Legend2[myrouter]: Outgoing Traffic in Bits per Second
1550         Legend3[myrouter]: Maximal 5 Minute Incoming Traffic
1551         Legend4[myrouter]: Maximal 5 Minute Outgoing Traffic
1552         LegendI[myrouter]: &nbsp;In:
1553         LegendO[myrouter]: &nbsp;Out:
1554
1555       Note, if LegendI or LegendO are set to an empty string with
1556
1557        LegendO[myrouter]:
1558
1559       The corresponding line below the graph will not be printed at all.
1560
1561   Timezone
1562       If you live in an international world, you might want to generate the
1563       graphs in different timezones. This is set in the TZ variable. Under
1564       certain operating systems like Solaris, this will provoke the localtime
1565       call to give the time in the selected timezone.
1566
1567       Example:
1568
1569        Timezone[myrouter]: Japan
1570
1571       The Timezone is the standard timezone of your system, ie Japan,
1572       Hongkong, GMT, GMT+1 etc etc.
1573
1574   Weekformat
1575       By default, mrtg (actually rateup) uses the strftime(3) '%V' option to
1576       format week numbers in the monthly graphs.  The exact semantics of this
1577       format option vary between systems.  If you find that the week numbers
1578       are wrong, and your system's strftime(3) routine supports it, you can
1579       try another format option.  The POSIX '%V' option correspond to the
1580       widely used ISO 8601 week numbering standard.  The week format
1581       character should be specified as a single letter; either W, V, or U.
1582
1583       The UNIX version of rateup uses the libc implementation of strftime.
1584       On Windows, the native strftime implementation does not know about %V.
1585       So there we use a different implementation of strftime that does
1586       support %V.
1587
1588       Example:
1589
1590        Weekformat[myrouter]: W
1591
1592   RRDRowCount
1593       This affects the creation of new rrd files. By default rrds are created
1594       to hold about 1 day's worth of high resolution data. (plus 1 week of 30
1595       minute data, 2 months of 2 hour data and 2 years of 1 day data).  With
1596       this Keyword you can change the number of base interval entries
1597       configured for new rrds as they get created. Note that you must take
1598       the interval time into account.
1599
1600       Example:
1601
1602        RRDRowCount[myrouter]: 1600
1603
1604   RRDRowCount30m
1605       As per RRDRowCount, but for the RRA's -typically- used for 30 minute
1606       data.  Even so, you must still take the base interval into account.
1607       Leaving out this keyword will force the old default of 800 rows.
1608
1609       Example:
1610
1611        RRDRowCount30m[myrouter]: 800
1612
1613   RRDRowCount2h
1614       As per RRDRowCount, but for the RRA's -typically- used for 2 hour data.
1615       Even so, you must still take the base interval into account.  Leaving
1616       out this keyword will force the old default of 800 rows.
1617
1618       Example:
1619
1620        RRDRowCount2h[myrouter]: 400
1621
1622   RRDRowCount1d
1623       As per RRDRowCount, but for the RRA's -typically- used for 1 day data.
1624       Even so, you must still take the base interval into account.  Leaving
1625       out this keyword will force the old default of 800 rows.
1626
1627       Example:
1628
1629        RRDRowCount1d[myrouter]: 200
1630
1631   RRDHWRRAs
1632       Normally the RRDs created by MRTG will just contain the information
1633       gathered directly from the respective target. With this option you can
1634       tap into rrdtools advanced aberrant behaviour detection module based on
1635       Holt-Winters forecasting. The RRDHWRRAs property specifies the Holt-
1636       Winters RRAs as described in the rrdcreate manual page.
1637
1638       Note, this setting will only affect newly created RRDs (targets).
1639
1640       Example:
1641
1642        RRDHWRRAs[myrouter]: RRA:HWPREDICT:1440:0.1:0.0035:288
1643
1644   TimeStrPos
1645       This defines placement of the timestamp string on the image. Possible
1646       values are RU, LU, RL, LL (which stand, respectively, for RightUpper,
1647       LeftUpper, RightLower and LeftLower corner) and NO (for no timestamp).
1648       By default, no timestamp is placed on the image.
1649
1650       Example:
1651
1652        TimeStrPos[myrouter]: RU
1653
1654   TimeStrFmt
1655       Using this keyword you may specify format of the timestamp to be placed
1656       on the image (if enabled by the TimeStrPos keyword). Specified string
1657       will be used by the strftime() function - see strftime(3) documentation
1658       for conversion specifiers available on your system.  Default format:
1659       %Y-%m-%d %H:%M
1660
1661       Example:
1662
1663        TimeStrFmt[myrouter]: %H:%M:%S
1664

THRESHOLD CHECKING

1666       Through its threshold checking functionality mrtg is able to detect
1667       threshold problems for the various targets and can call external
1668       scripts to handle those problems (e.g. send email or a page to an
1669       administrator).
1670
1671       Threshold checking is configured through the following parameters:
1672
1673   ThreshDir (GLOBAL)
1674       By defining ThreshDir to point to a writable directory, MRTG will only
1675       alert you when a threshold boundary has been crossed.
1676
1677       Example:
1678
1679        ThreshDir: /var/mrtg/thresh
1680
1681   ThreshHyst (GLOBAL)
1682       If a threshold is broken, and you have a threshdir defined, then mrtg
1683       will send mail once the threshold becomes 'unborken' to avoid
1684       situations where broken and unbroken messages get sent in close
1685       succession, we only send an unbroken message once the curent value is
1686       0.1 (10%) away from the threshold.  using the ThreshHyst config
1687       variable you can customize this value.
1688
1689       Example for 5%:
1690
1691        ThreshHyst: 0.05
1692
1693   ThreshMailServer (GLOBAL)
1694       Adderss of an SMTP server which is going to accept mail about
1695       Thresholds being broken and unbroken.
1696
1697   ThreshMailSender (GLOBAL)
1698       What is the sender address of the threshold mail.
1699
1700       Example:
1701
1702        ThreshMailSender: mrtg@example.com
1703
1704   ThreshMailAddress (PER TARGET)
1705       Email address for Threshold related Mails. This will only work if a
1706       mailserver has been configured.
1707
1708       Example:
1709
1710        ThreshMailAddress[_]: admin@example.com
1711        ThreshMailAddress[router]:
1712
1713       This would bring threshold releaed mail to all but the target called
1714       'router'.
1715
1716   ThreshMinI  (PER TARGET)
1717       This is the minimum acceptable value for the Input (first) parameter.
1718       If the parameter falls below this value, the program specified in
1719       ThreshProgI will be run and a mail will be sent to the
1720       ThreshMailAddress if specified.  If the value ends in '%' then the
1721       threshold is defined relative to MaxBytes.
1722
1723   ThreshMaxI (PER TARGET)
1724       Works the same as TheshMinI but it acts when the value is higher than
1725       ThreshMaxI.
1726
1727   ThreshDesc (PER TARGET)
1728       Its value will be assigned to the environment variable THRESH_DESC
1729       before any of the programs mentioned below are called. The programs can
1730       use the value of this variable to produce more user-friendly output.
1731
1732   ThreshProgI  (PER TARGET)
1733       This defines a program to be run if ThreshMinI or ThreshMaxI is broken.
1734       MRTG passes 3 arguments: the $router variable, the threshold value
1735       broken, and the current parameter value.
1736
1737   ThreshProgOKI  (PER TARGET)
1738       This defines a program to be run if the parameter is currently OK
1739       (based on ThreshMinI and ThreshMaxI), but wasn't OK on the previous
1740       running -- based on the files found in ThreshDir. MRTG passes 3
1741       arguments: the $router variable the unbroken threshold value, and the
1742       current parameter value.
1743
1744   ThreshMinO, ThreshMaxO, ThreshProgO, and ThreshProgOKO
1745       These work the same as their *I counterparts, except on the Output
1746       (second) parameter.
1747
1748   SetEnv
1749       When calling threshold scripts from within your cfg file you might want
1750       to pass some data on to the script. This can be done with the SetEnv
1751       configuration option which takes a series of environment variable
1752       assignments. Note that the quotes are mandatory. This does not work for
1753       external scripts. It is not possible to set environment variables per
1754       target.
1755
1756       Example:
1757
1758        SetEnv[myrouter]:  EMAIL="contact_email@someplace.net"
1759                           HOST="www.some_server.net"
1760
1761   HW Failure Bassed Threshold Checking
1762       When using rrd based logging with HW RRAs defined. You can use the
1763       confidence bounds violations stored in the FAILURES RRA for threshold
1764       based alerts.
1765
1766       There the all target specific threshold variables have a Hold-Winters
1767       counterpart:
1768
1769        ThreshMailAddress -> HWThreshMailAddress
1770        ThreshMinI        -> HWThreshMinI
1771        ...
1772
1773       The global variables for threshold checking are shared except for the
1774
1775        ThreshHyst        -> HWThreshHyst
1776
1777       And HWThreshDesc sets the HWTHRESH_DESC variable.
1778

PER TARGET DEFAULT VALUES

1780   Pre- and Postfix
1781       To save yourself some typing you can define a target called '^'. The
1782       text of every Keyword you define for this target will be PREPENDED to
1783       the corresponding Keyword of all the targets defined below this line.
1784       The same goes for a Target called '$' but its text will be APPENDED.
1785
1786       Note that a space is inserted between the prepended text and the
1787       Keyword value, as well as between the Keyword value and the appended
1788       text. This works well for text-valued Keywords, but is not very useful
1789       for other Keywords. See the "default" target description below.
1790
1791       The example will make mrtg use a common header and a common contact
1792       person in all the pages generated from targets defined later in this
1793       file.
1794
1795       Example:
1796
1797        PageTop[^]: <H1>NoWhere Unis Traffic Stats</H1><HR>
1798        PageTop[$]: Contact Peter Norton if you have any questions<HR>
1799
1800       To remove the prepend/append value, specify an empty value, e.g.:
1801
1802        PageTop[^]:
1803        PageTop[$]:
1804
1805   NoSpaceChar
1806       With PREPEND and APPEND (see below) there is normally a space inserted
1807       between the local value and the PRE- or APPEND value. Sometimes this is
1808       not desirable. You can use the global option NoSpaceChar to define a
1809       character which can be mentioned at the end of a $ or ^ definition in
1810       order to supress the space.
1811
1812       Example:
1813
1814         NoSpaceChar: ~
1815         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@~
1816         Target[a]: a.tolna.net
1817         Target[b]: b.tolna.net
1818         Target[c]: c.tolna.net
1819         Target[d]: d.tolna.net
1820
1821   Default Values
1822       The target name '_' specifies a default value for that Keyword. In the
1823       absence of explicit Keyword value, the prepended and the appended
1824       keyword value, the default value will be used.
1825
1826       Example:
1827
1828        YSize[_]: 150
1829        Options[_]: growright,bits,nopercent
1830        WithPeak[_]: ymw
1831        Suppress[_]: y
1832        MaxBytes[_]: 1250000
1833
1834       To remove the default value and return to the 'factory default',
1835       specify an empty value, e.g.:
1836
1837        YLegend[_]:
1838
1839       There can be several instances of setting the default/prepend/append
1840       values in the configuration file. The later setting replaces the
1841       previous one for the rest of the configuration file.  The
1842       default/prepend/append values used for a given keyword/target pair are
1843       the ones that were in effect at the point in the configuration file
1844       where the target was mentioned for the first time.
1845
1846       Example:
1847
1848        MaxBytes[_]: 1250000
1849        Target[myrouter.somplace.edu.2]: 2:public@myrouter.somplace.edu
1850        MaxBytes[_]: 8000
1851        Title[myrouter.somplace.edu.2]: Traffic Analysis for myrouter.somplace.edu IF 2
1852
1853       The default MaxBytes for the target myrouter.someplace.edu.2 in the
1854       above example will be 1250000, which was in effect where the target
1855       name myrouter.someplace.edu.2 first appeared in the config file.
1856

COMMAND LINE OPTIONS

1858       --user username  and --group groupname
1859           Run as the given user and/or group. (Unix Only)
1860
1861       --lock-file filename
1862           Use an alternate lock-file (the default is to use the
1863           configuration-file appended with "_l").
1864
1865       --confcache-file filename
1866           Use an alternate confcache-file (the default is to use the
1867           configuration-file appended with ".ok")
1868
1869       --logging filename|eventlog
1870           If this is set to writable filename, all output from mrtg
1871           (warnings, debug messages, errors) will go to filename. If you are
1872           running on Win32 you can specify eventlog instead of a filename
1873           which will send all error to the windows event log.
1874
1875           NOTE: Note, there is no Message DLL for mrtg included with mrtg.
1876           This has the side effect that the windows event logger will display
1877           a nice message with every entry in the event log, complaing about
1878           the fact that mrtg has no message dll. If you go to the mrtg
1879           contrib download area (on the website) you will find the
1880           mrtg-message-dll.zip which does contain such a thing.
1881
1882       --daemon
1883           Put MRTG into the background, running as a daemon. This works the
1884           same way as the config file option, but the switch is required for
1885           proper FHS operation (because /var/run is writable only by root)
1886
1887       --fhs
1888           Configure all mrtg paths to conform to the FHS specification;
1889           http://www.pathname.com/fhs/
1890
1891       --check
1892           Only check the cfg file for errors. Do not do anything.
1893
1894       --pid-file=s
1895           Define the name and path of the pid file for mrtg running as a
1896           daemon
1897
1898       --debug=s
1899           Enable debug options. The argument of the debug option is a comma
1900           separated list of debug values:
1901
1902            cfg  - watch the config file reading
1903            dir  - directory mangeling
1904            base - basic program flow
1905            tarp - target parser
1906            snpo - snmp polling
1907            coca - confcache operations
1908            fork - forking view
1909            time - some timing info
1910            log  - logging of data via rateup or rrdtool
1911            eval - print eval strings before evaluting them
1912            prof - add hires timing info the rrd calls
1913
1914           Example:
1915
1916            --debug="cfg,snpo"
1917

EXIT CODES

1919       An exit code of 0 indicates that all targets were successful.
1920       Generally speaking, most codes greater than 0 indicate that there was
1921       an unrecoverable problem.  One exception to this is code 91, which
1922       indicates that at least one of the targets was successful.  A partial
1923       listing of the codes follows:
1924
1925         0: All targets sucessful
1926
1927         2: Config error (can't read, fatal error in config, etc)
1928        17: Another MRTG process is processing config
1929
1930        91: At least one target sucessful
1931        92: No targets were sucessful
1932

EXAMPLES

1934   Minimal mrtg.cfg
1935        WorkDir: /usr/tardis/pub/www/stats/mrtg
1936        Target[r1]: 2:public@myrouter.somplace.edu
1937        MaxBytes[r1]: 8000
1938        Title[r1]: Traffic Analysis ISDN
1939        PageTop[r1]: <H1>Stats for our ISDN Line</H1>
1940
1941   Cfg for several Routers.
1942        WorkDir: /usr/tardis/pub/www/stats/mrtg
1943        Title[^]: Traffic Analysis for
1944        PageTop[^]: <H1>Stats for
1945        PageTop[$]: Contact The Chief if you notice anybody<HR>
1946        MaxBytes[_]: 8000
1947        Options[_]: growright
1948
1949        Title[isdn]: our ISDN Line
1950        PageTop[isdn]: our ISDN Line</H1>
1951        Target[isdn]: 2:public@router.somplace.edu
1952
1953        Title[backb]: our Campus Backbone
1954        PageTop[backb]: our Campus Backbone</H1>
1955        Target[backb]: 1:public@router.somplace.edu
1956        MaxBytes[backb]: 1250000
1957
1958        # the following line removes the default prepend value
1959        # defined above
1960
1961        Title[^]:
1962
1963        Title[isdn2]: Traffic for the Backup ISDN Line
1964        PageTop[isdn2]: our ISDN Line</H1>
1965        Target[isdn2]: 3:public@router.somplace.edu
1966

AUTHOR

1968       Tobias Oetiker <tobi@oetiker.ch> and many contributors
1969
1970
1971
19722.17.4                            2012-01-12                 MRTG-REFERENCE(1)
Impressum