1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205
|
<HTML>
<HEAD>
<TITLE>Multi Router Traffic Grapher -- Configuration File Format</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#990200" VLINK="#006342" >
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#Multi_Router_Traffic_Grapher_">Multi Router Traffic Grapher - Configuration File Format</A>
<LI><A HREF="#Global_Configuration">Global Configuration </A>
<LI><A HREF="#Optional_Global_Parameters">Optional Global Parameters</A>
<UL>
<LI><A HREF="#Refresh">Refresh</A>
<LI><A HREF="#Interval">Interval</A>
<LI><A HREF="#WriteExpires">WriteExpires</A>
<LI><A HREF="#IconDir">IconDir</A>
</UL>
<LI><A HREF="#Configuration_for_each_Target_yo">Configuration for each Target you want to monitor</A>
<UL>
<LI><A HREF="#Target">Target</A>
<LI><A HREF="#RouterUptime">RouterUptime</A>
<LI><A HREF="#MaxBytes">MaxBytes</A>
<LI><A HREF="#Title">Title </A>
<LI><A HREF="#PageTop">PageTop</A>
</UL>
<LI><A HREF="#Optional_Target_Configuration_Ta">Optional Target Configuration Tags</A>
<UL>
<LI><A HREF="#AddHead">AddHead</A>
<LI><A HREF="#AbsMax">AbsMax </A>
<LI><A HREF="#Unscaled">Unscaled</A>
<LI><A HREF="#WithPeak">WithPeak</A>
<LI><A HREF="#Supress">Supress</A>
<LI><A HREF="#Directory">Directory</A>
<LI><A HREF="#XSize_and_YSize">XSize and YSize</A>
<LI><A HREF="#XZoom_YZoom">XZoom YZoom</A>
<LI><A HREF="#XScale_YScale">XScale YScale</A>
<LI><A HREF="#Step">Step</A>
<LI><A HREF="#Options">Options</A>
<LI><A HREF="#Colours">Colours</A>
<LI><A HREF="#Background">Background</A>
<LI><A HREF="#YLegend_ShortLegend_Legend_123">YLegend, ShortLegend, Legend[1234]</A>
<LI><A HREF="#Timezone">Timezone</A>
<LI><A HREF="#Weekformat">Weekformat</A>
</UL>
<LI><A HREF="#Two_very_special_Target_names">Two very special Target names</A>
<LI><A HREF="#Some_example_mrtg_cfg_files">Some example mrtg.cfg files</A>
<UL>
<LI><A HREF="#Minimal_mrtg_cfg">Minimal mrtg.cfg</A>
<LI><A HREF="#Minimal_Cfg_for_several_Routers_">Minimal Cfg for several Routers.</A>
</UL>
</UL>
<!-- INDEX END -->
<HR>
<img src="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg-ti.gif">
<P>
<HR>
<H1><A NAME="Multi_Router_Traffic_Grapher_">Multi Router Traffic Grapher -- Configuration File Format
</A></H1>
This file is for use with mrtg-2.0
<P>
Note:
<P>
<UL>
<LI><STRONG></STRONG>
Keywords must start at the begin of a line.
<P>
<LI><STRONG></STRONG>
Lines which follow a keyword line which do start with a blank are appended
to the keyword line
<P>
<LI><STRONG></STRONG>
Empty Lines are ignored
<P>
<LI><STRONG></STRONG>
Lines starting with a # sign are comments.
<P>
</UL>
<P>
<HR>
<H1><A NAME="Global_Configuration">Global Configuration
</A></H1>
Workdir specifies where the logfiles and the webpages should be created.
<P>
Example:
<P>
<PRE> WorkDir: /usr/tardis/pub/www/stats/mrtg
</PRE>
<P>
<P>
<HR>
<H1><A NAME="Optional_Global_Parameters">Optional Global Parameters
</A></H1>
<P>
<HR>
<H2><A NAME="Refresh">Refresh
</A></H2>
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).
<P>
Example:
<P>
<PRE> Refresh: 600
</PRE>
<P>
<P>
<HR>
<H2><A NAME="Interval">Interval
</A></H2>
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:
<P>
<UL>
<LI><STRONG></STRONG>
the generated HTML page does contain the right information about the
calling interval ...
<P>
<LI><STRONG></STRONG>
a META header in the generated HTML page will instruct caches about the
time to live of this page .....
<P>
</UL>
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.
<P>
Example:
<P>
<PRE> Interval: 10
</PRE>
<P>
<P>
<HR>
<H2><A NAME="WriteExpires">WriteExpires
</A></H2>
With this switch mrtg will generate .meta files for CERN 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 might have
to set ``MetaDir .'' in your srm.conf file for this to work
<P>
NOTE: If you are running Apache-1.2 you can use the mod_expire to achieve
the same effect ... see the file htaccess-dist
<P>
Example:
<P>
<PRE> WriteExpires: Yes
</PRE>
<P>
<P>
<HR>
<H2><A NAME="IconDir">IconDir
</A></H2>
If you want to keep the mrtg icons in some place other than the working
directory, use the IconDir varibale to give its url.
<P>
Example:
<P>
<PRE> IconDir: /mrtgicons/
</PRE>
<P>
<P>
<HR>
<H1><A NAME="Configuration_for_each_Target_yo">Configuration for each Target you want to monitor
</A></H1>
The configuration keywords ``Target'' must be followed by a unique name.
This will also be the name used for the webpages, logfiles and gifs created
for that target.
<P>
Note that the ``Target'' sections can be auto-generated with the <STRONG>cfgmaker</STRONG> tool. Check <EM>readme.html</EM> for instructions.
<P>
<P>
<HR>
<H2><A NAME="Target">Target
</A></H2>
With the ``Target'' keyword you tell mrtg what it should monitor. The
``Target'' keyword takes arguments in a wide range of formats:
<P>
<UL>
<LI><STRONG></STRONG>
The most basic format is ``port:community@router'' This will generate a
traffic graph for port 'port' of the router 'router' and it will use the
community 'community' for the snmp query.
<P>
Example:
<P>
<PRE> Target[ezwf]: 2:public@wellfleet-fddi.ethz.ch
</PRE>
<P>
<LI><STRONG></STRONG>
Sometimes you are sitting on the wrong side of the link. And you would like
to have mrtg report Incoming traffic as outgoing and visa versa. This can
be achieved by adding the '-' sign in front of the ``Target'' description.
It flips the in and outgoing traffic rates.
<P>
Example:
<P>
<PRE> Target[ezci]: -1:public@ezci-ether.ethz.ch
</PRE>
<P>
<LI><STRONG></STRONG>
You can also explicitly define the OID to query by using the following
syntax 'OID_1&OID_2:community@router' The following example will
retrieve error input and output octets/sec on interface 1. MRTG needs to
graph two values, so you need to specify two OID's such as temperature and
humidity or error input and error output.
<P>
Example:
<P>
<PRE> 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
</PRE>
<P>
<LI><STRONG></STRONG>
mrtg knows a number of symbolical SNMP variable names. See the file
mibhelp.txt for a list of known names. One example are the ifInErrors and
and ifOutErrors names. This means you can specify the above as:
<P>
Example:
<P>
<PRE> Target[ezwf]: ifInErrors.1&ifOutErrors.1:public@myrouter
</PRE>
<P>
<LI><STRONG></STRONG>
if you want to monitor something which does not provide data via snmp you
can use some external program to do the data gathering.
<P>
The external command must return 4 lines of output:
<P>
<DL>
<DT><STRONG><A NAME="item_Line">Line 1
</A></STRONG><DD>
current state of the 'incoming bytes counter'
<P>
<DT><STRONG>Line 2
</A></STRONG><DD>
current state of the 'outgoing bytes counter'
<P>
<DT><STRONG>Line 3
</A></STRONG><DD>
string, telling the uptime of the target.
<P>
<DT><STRONG>Line 4
</A></STRONG><DD>
string, telling the name of the target.
<P>
</DL>
Depending on the type of data your script returns you might want to use the
'gauge' or 'absolute' arguments for the ``Options'' keyword.
<P>
Example:
<P>
<PRE> Target[ezwf]: `/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0`
</PRE>
<P>
<LI><STRONG></STRONG>
You can also use several statements in a mathematical expression. This
could be used to aggregate both B channels in an ISDN connection or
multiple T1's that are aggregated into a single channel for greater
bandwidth. Note the whitespace arround the target definitions.
<P>
Example:
<P>
<PRE> Target[ezwf]: 2:public@wellfleetA + 1:public@wellfleetA
* 4:public@ciscoF
</PRE>
<P>
</UL>
<P>
<HR>
<H2><A NAME="RouterUptime">RouterUptime
</A></H2>
In cases where you calculate the used bandwidth from several interfaces you
normaly don't get the routeruptime and routername displayed on the web
page.
<P>
If this interface 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 RouterUptime keyword.
<P>
Example:
<P>
<PRE> Target[kacisco]: 1:public@194.64.66.250 + 2:public@194.64.66.250
RouterUptime[kacisco]: public@194.64.66.250
</PRE>
<P>
<P>
<HR>
<H2><A NAME="MaxBytes">MaxBytes
</A></H2>
How many bytes per second can this port carry. 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 ``MaxBytes'' value will be used by mrtg to
decide whether it got a valid response from the router. If a number higher
than ``MaxBytes'' is returned, it is ignored. Also read the section on
AbsMax for further info.
<P>
Example:
<P>
<PRE> MaxBytes[ezwf]: 1250000
</PRE>
<P>
<P>
<HR>
<H2><A NAME="Title">Title
</A></H2>
Title for the HTML page which gets generated for the graph.
<P>
Example:
<P>
<PRE> Title[ezwf]: Traffic Analysis for Arnes
</PRE>
<P>
<P>
<HR>
<H2><A NAME="PageTop">PageTop
</A></H2>
Things to add to the top of the generated HTML page. Note that you can have
several lines of text as long as the first column is empty.
<P>
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 '\n'
sequence.
<P>
Example:
<P>
<PRE> PageTop[ezwf]: <H1>Traffic Analysis for ETZ C95.1</H1>
Our Campus Backbone runs over an FDDI line\n
with a maximum transfer rate of 12.5 Mega Bytes per
Second.
</PRE>
<P>
<P>
<HR>
<H1><A NAME="Optional_Target_Configuration_Ta">Optional Target Configuration Tags
</A></H1>
<P>
<HR>
<H2><A NAME="AddHead">AddHead
</A></H2>
Use this tag like the PageTop header, but its contents will be added
between </TITLE> and </HEAD>.
<P>
Example:
<P>
<PRE> AddHead[ezwf]: <!-- Just a comment for fun -->
</PRE>
<P>
<P>
<HR>
<H2><A NAME="AbsMax">AbsMax
</A></H2>
If you are monitoring a link which can handle more traffic than the
MaxBytes value. Eg, a line which uses compression or some frame relay link,
you can use the AbsMax 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 absmax, rateup will ignore
values higher then MaxBytes.
<P>
Example:
<P>
<PRE> AbsMax[ezwf]: 2500000
</PRE>
<P>
<P>
<HR>
<H2><A NAME="Unscaled">Unscaled
</A></H2>
By default each graph is scaled vertically to make the actual data visible
even when it is much lower than MaxBytes. With the ``Unscaled'' variable
you can supress 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 I supress scaling for the yearly and the monthly graph.
<P>
Example:
<P>
<PRE> Unscaled[ezwf]: ym
</PRE>
<P>
<P>
<HR>
<H2><A NAME="WithPeak">WithPeak
</A></H2>
By default the graphs only contain the average transfer rates for incoming
and outgoing traffic. The following option instructs mrtg to display the
peak 5 minute transfer rates 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.
<P>
Examples:
<P>
<PRE> WithPeak[ezwf]: ym
</PRE>
<P>
<P>
<HR>
<H2><A NAME="Supress">Supress
</A></H2>
By Default mrtg produces 4 graphs. With this option you can supress the
generation of selected graphs. The format is analog to the above option. In
this example we supress the yearly graph as it is quite empty in the
beginning.
<P>
Example:
<P>
<PRE> Supress[ezwf]: y
</PRE>
<P>
<P>
<HR>
<H2><A NAME="Directory">Directory
</A></H2>
By default, mrtg puts all the files that it generates for each router (the
GIFs, the HTML page, the log file, etc.) in WorkDir.
<P>
If the ``Directory'' option is specified, the files are instead put into a
directory under WorkDir. (For example, given the options in this
mrtg.cfg-dist file, the ``Directory'' option below would cause all the ezwf
files to be put into /usr/tardis/pub/www/stats/mrtg/ezwf .)
<P>
The directory must already exist; mrtg will not create it.
<P>
Example:
<P>
<PRE> Directory[ezwf]: ezwf
</PRE>
<P>
<P>
<HR>
<H2><A NAME="XSize_and_YSize">XSize and YSize
</A></H2>
By Default mrtgs graphs are 100 by 400 pixels wide (plus some more for the
labels. In the example we get almost square graphs ...
<P>
Note: XSize must be between 20 and 600 YSize must be larger than 20
<P>
Example:
<P>
<PRE> XSize[ezwf]: 300
YSize[ezwf]: 300
</PRE>
<P>
<P>
<HR>
<H2><A NAME="XZoom_YZoom">XZoom YZoom
</A></H2>
If you want your graphs to have larger pixels, you can ``Zoom'' them.
<P>
Example:
<P>
<PRE> XZoom[ezwf]: 2.0
YZoom[ezwf]: 2.0
</PRE>
<P>
<P>
<HR>
<H2><A NAME="XScale_YScale">XScale YScale
</A></H2>
If you want your graphs to be actually scaled use XScale and YScale.
(Beware while this works, the results look ugly (to be frank) so if someone
wants fix this: patches are welcome.
<P>
Example:
<P>
<PRE> XScale[ezwf]: 1.5
YScale[ezwf]: 1.5
</PRE>
<P>
<P>
<HR>
<H2><A NAME="Step">Step
</A></H2>
Change the default step with from 5 * 60 seconds to something else (I have
not tested this well ...)
<P>
Example:
<P>
<PRE> Step[ezwf]: 60
</PRE>
<P>
<P>
<HR>
<H2><A NAME="Options">Options
</A></H2>
The ``Options'' Keyword allows you to set some boolean switches:
<P>
<DL>
<DT><STRONG><A NAME="item_growright">growright
</A></STRONG><DD>
The graph grows to the left by default.
<P>
<DT><STRONG><A NAME="item_bits">bits
</A></STRONG><DD>
All the numbers printed are in bits instead of bytes ... looks much more
impressive :-)
<P>
<DT><STRONG><A NAME="item_noinfo">noinfo
</A></STRONG><DD>
Supress the information about uptime and device name in the generated
webpage.
<P>
<DT><STRONG><A NAME="item_absolute">absolute
</A></STRONG><DD>
This is for data sources which reset their value when they are read. This
means that rateup has not to build the difference between this and the last
value read from the data source. Useful for external data gatherers.
<P>
<DT><STRONG><A NAME="item_gauge">gauge
</A></STRONG><DD>
Treat the values gathered from target as absolute and not as counters. This
would be useful to monitor things like diskspace, load and so on ....
<P>
<DT><STRONG><A NAME="item_nopercent">nopercent
</A></STRONG><DD>
Don't print usage percentages
<P>
</DL>
Example:
<P>
<PRE> Options[ezwf]: growright, bits
</PRE>
<P>
<P>
<HR>
<H2><A NAME="Colours">Colours
</A></H2>
The ``Colours'' 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 RGB value is the
real colour used for the display, both on the graph and n the html doc.
<P>
Format is: Colour1#RRGGBB,Colour2#RRGGBB,Colour3#RRGGBB,Colour4#RRGGBB
<P>
<DL>
<DT><STRONG><A NAME="item_Colour1">Colour1
</A></STRONG><DD>
Input on default graph
<P>
<DT><STRONG><A NAME="item_Colour2">Colour2
</A></STRONG><DD>
Output on default graph
<P>
<DT><STRONG><A NAME="item_Colour3">Colour3
</A></STRONG><DD>
Max input
<P>
<DT><STRONG><A NAME="item_Colour4">Colour4
</A></STRONG><DD>
Max output
<P>
<DT><STRONG><A NAME="item_RRGGBB">RRGGBB
</A></STRONG><DD>
2 digit hex values for Red, Green and Blue
<P>
</DL>
Example:
<P>
<PRE> Colours[ezwf]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff
</PRE>
<P>
<P>
<HR>
<H2><A NAME="Background">Background
</A></H2>
With the ``Background'' tag you can configure the background colour of the
generated HTML page
<P>
Example:
<P>
<PRE> Background[ezwf]: #a0a0a0a
</PRE>
<P>
<P>
<HR>
<H2><A NAME="YLegend_ShortLegend_Legend_123">YLegend, ShortLegend, Legend[1234]
</A></H2>
The following keywords allow you to override the text displayed for the
various legends of the graph and in the HTML document
<P>
<DL>
<DT><STRONG><A NAME="item_YLegend">YLegend
</A></STRONG><DD>
The Y-Axis of the graph
<P>
<DT><STRONG><A NAME="item_ShortLegend">ShortLegend
</A></STRONG><DD>
The 'b/s' string used for Max, Average and Current
<P>
<DT><STRONG><A NAME="item_Legend">Legend[1234IO]
</A></STRONG><DD>
The strings for the colour legend
<P>
</DL>
Example:
<P>
<PRE> 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:
</PRE>
<P>
Note, if LegendI or LegendO are set to an empty string with
<P>
<PRE> LegendO[ezwf]:
</PRE>
<P>
The corresponding line below the graph will not be printed at all.
<P>
<P>
<HR>
<H2><A NAME="Timezone">Timezone
</A></H2>
If you live in an international world, you might want to generate the
graphs in different timezones. This is set in the TZ variable. Under
certain operating systems like Solaris, this will provoke the localtime
call to give the time in the selected timezone ...
<P>
Example:
<P>
<PRE> Timezone[ezwf]: Japan
</PRE>
<P>
The Timezone is the standard Solaris timezone, ie Japan, Hongkong, GMT,
GMT+1 etc etc.
<P>
<P>
<HR>
<H2><A NAME="Weekformat">Weekformat
</A></H2>
By default, mrtg (actually rateup) uses the <CODE>strftime(3)</CODE> '%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 <CODE>strftime(3)</CODE> routine supports it,
you can try another format option. The POSIX '%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.
<P>
Example:
<P>
<PRE> Weekformat[ezwf]: V
</PRE>
<P>
<P>
<HR>
<H1><A NAME="Two_very_special_Target_names">Two very special Target names
</A></H1>
To save yourself some typing you can define a target called '^'. The text
of every Keyword you define for this target will be PREPENDED to the
corresponding Keyword of all the targets defined below this line. The same
goes for a Target called '$' but its options will be APPENDED.
<P>
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.
<P>
Example:
<P>
<PRE> PageTop[^]: <H1>NoWhere Unis Traffic Stats</H1><HR>
PageTop[$]: Contact Peter Norton if you have any questions<HR>
</PRE>
<P>
<P>
<HR>
<H1><A NAME="Some_example_mrtg_cfg_files">Some example mrtg.cfg files
</A></H1>
<P>
<HR>
<H2><A NAME="Minimal_mrtg_cfg">Minimal mrtg.cfg
</A></H2>
<PRE> WorkDir: /usr/tardis/pub/www/stats/mrtg
Target[r1]: 2:public@myrouter.somplace.edu
MaxBytes[r1]: 64000
Title[r1]: Traffic Analysis ISDN
PageTop[r1]: <H1>Stats for our ISDN Line</H1>
</PRE>
<P>
<P>
<HR>
<H2><A NAME="Minimal_Cfg_for_several_Routers_">Minimal Cfg for several Routers.
</A></H2>
<PRE> WorkDir: /usr/tardis/pub/www/stats/mrtg
Title[^]: Traffic Analysis for
PageTop[^]: <H1>Stats for our
PageTop[$]: Contact The Chief if you notice anybody<HR>
</PRE>
<P>
<PRE> Title[isdn]: our ISDN Line
PageTop[isdn]: our ISDN Line </H1>
Target[isdn]: 2:public@router.somplace.edu
MaxBytes[isdn]: 64000
Title[backb]: our Campus Backbone
PageTop[backb]: our Campus Backbone </H1>
Target[backb]: 1:public@router.somplace.edu
MaxBytes[backb]: 1250000
</PRE>
<P>
<PRE> # the following line removes the default prepend value
# defined above
</PRE>
<P>
<PRE> Title[^]:
Title[isdn2]: Traffic for the Backup ISDN Line
PageTop[isdn2]: our ISDN Line </H1>
Target[isdn2]: 3:public@router.somplace.edu
MaxBytes[isdn2]: 64000
</PRE>
<P>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR>
<TD WIDTH=63><A ALT="MRTG"
HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG
BORDER=0 SRC="mrtg-l.gif"></A></TD>
<TD WIDTH=25><A ALT=""
HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG
BORDER=0 SRC="mrtg-m.gif"></A></TD>
<TD WIDTH=388><A ALT=""
HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG
BORDER=0 SRC="mrtg-r.gif"></A></TD>
</TR>
</TABLE>
<SPACER TYPE=VERTICAL SIZE=4>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR VALIGN=top>
<TD WIDTH=88 ALIGN=RIGHT><FONT FACE="Arial,Helvetica" SIZE=2>
2.5.2-1998/2/6</FONT></TD>
<TD WIDTH=388 ALIGN=RIGHT><FONT FACE="Arial,Helvetica" SIZE=2>
<A HREF="http://ee-staff.ethz.ch/~oetiker/">Tobias Oetiker</A>
<A HREF="mailto:oetiker@ee.ethz.ch"><oetiker@ee.ethz.ch></A>
and <A HREF="http://www.bungi.com">Dave Rand</A> <A HREF="mailto:dlr@bungi.com"><dlr@bungi.com></A></FONT>
</TD>
</TR>
</TABLE>
</DL>
</BODY>
</HTML>
|