August 14, 2004
The latest release of this document is available here.
From the MRTG documentation:
The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network links. MRTG generates HTML pages containing PNG images which provide a LIVE visual representation of this traffic.
Check http://www.stat.ee.ethz.ch/mrtg/ to see what it does.
Check http://people.ee.ethz.ch/~oetiker/webtools/mrtg for all the details about MRTG.
MRTG's original author is Tobias Oetiker <oetiker@ee.ethz.ch> assisted by many contributors.
While the HTML files created by MRTG can be installed directly into a Web Server for remote viewing, a Web Server is not essential for using MRTG.
Earlier versions of NetWare could not run MRTG natively for several reasons:
Support for the NetWare OS has now been added into MRTG, beginning with release 2.10.15.
Liberallly minded operating systems support a commandline length approaching 1000 characters. In such environments it is an easy matter to pass the sometimes high number of parameters used by MRTG's Rateup executable directly on the commandline. Until NetWare 6.5, NetWare had a commandline limit of 512 characters. This limitation was removed for NetWare 6.0 by Service Pack 5. For other NetWare versions having earlier Service Packs, a modified MRTG script and Rateup NLM is also available. See the NetWare Support section of this document for further details.
The necessary Makefile.Netware file is now available and rateup.c has been patched to allow compiling for the NetWare platform. Additionally, mrtg.pl needed to be revised because of the unique (to NetWare) name of executables (NLM).
The absence of a specific installation procedure has caused MRTG to fail in the past because the Perl script could not find or load the Rateup executable (The installation method supplied here will solve this problem for now).
The MRTG.pl script in the 2.10.15 version of MRTG has been configured against the day the NetWare Perl5 is finally able to work correctly. As an interim solution, a modified copy of the 2.10.15 MRTG.pl script is available. See the NetWare Support section of this document for further details. This work-around is needed even when using the latest June, 2004 release of Perl5 for NetWare.
MRTG is freely available under the terms of the GNU General Public License.
The information provided in this document and its related software are supplied "as is", in good faith and with the best of intentions. However, no responsibility is accepted for errors or any loss resulting from its use.
Any feedback regarding errors, bugs or enhancements are always welcome.
For copies of the .ncf files and Rateup NLM, see NetWare Support below.
Install the latest Perl 5.8 release on your server. See the Perl documentation for details.
Create the following directories:
SYS:/Mrtg SYS:/Mrtg/bin SYS:/Mrtg/contrib (Optional for this document) SYS:/Mrtg/doc (Optional for this document) SYS:/Mrtg/html SYS:/Mrtg/images SYS:/Mrtg/logs SYS:/Mrtg/translate SYS:/Mrtg/work
Copy from the MRTG package the following files:
\bin\* to SYS:/Mrtg/bin All files. See Note 1.
Note 1: Add a .pl extension to the mrtg, cfgmaker and indexmaker files.
\contrib\* to SYS:/Mrtg/contrib/ Optional. Include sub-directories \doc\* to SYS:/Mrtg/doc/ Optional. All files \images\* to SYS:/Mrtg/images/ All files \translate\* to SYS:/Mrtg/translate/ All files. See Note 2.
Note 2: For English only language support, all \translate files EXCEPT Locales_mrtg may be deleted.
\lib\* to SYS:/Perl/lib Include sub-directories
This will create the SYS:/Perl/lib/mrtg2 and ./pod directories.
Download copies of the three .ncf files and install them:
*.ncf to SYS:/Mrtg/bin
See NetWare Support (below) for details on how to obtain copies of these files.
Download a copy of the modified MRTG.pl script and install it:
mrtg.pl to SYS:/Mrtg/bin Overwrite or rename existing file
See NetWare Support (below) for details on how to obtain a copy of this file.
Compile or download a copy of the Rateup executable (Rateup.nlm) and install it:
rateup.nlm to SYS:/Perl/scripts
See Compiling Rateup.nlm (below) for details on compiling it yourself.
See NetWare Support (below) for details on how to obtain a pre-built binary.
Refer to Novell documentation on configuring and loading SNMP support on your server if this is the device to be monitored. SNMP support only needs to be loaded on the server if that is the device to be monitored.
Edit sys:/mrtg/bin/MakeMrtgCfg.ncf:
- replace ccccc with the GET community name for the SNMP device (typically 'public'), - replace ddddd with the DNS name or IP address of the device to be monitored. e.g public@www.myserver.com, public@10.202.65.180 Note 1: These are NOT mail addresses, they just look like one! Note 2: To monitor multiple devices, add their entries to the same line: e.g perl cfgmaker.pl public@www.myserver.com public@rtr1.myserver.com > sys:/mrtg/bin/mrtg.cfg
In this "Getting Started", it is suggested to only monitor a single device.
At the server console, run:
sys:/mrtg/bin/MakeMrtgCfg.ncf
This will create Mrtg.cfg in sys:/mrtg/bin.
Edit the Mrtg.cfg configuration file created in the previous step.
Below line 16 (*** Global Defaults), add:
WorkDir: <a path> e.g WorkDir: sys:/mrtg/work or + HtmlDir: <a path> e.g HtmlDir: sys:/mrtg/html + ImageDir: <a path> e.g ImageDir: sys:/mrtg/work + LogDir: <a path> e.g LogDir: sys:/mrtg/logs IconDir: <a path> e.g IconDir: ../images + Note 1: The WorkDir entry if specified, overrides the three settings indicated. Note 2: The HtmlDir entry specifies where MRTG will create its HTML pages. Note 3: The ImageDir entry specifies where the created graphic icons are placed. Note 4: The IconDir entry specifies where the MRTG icons are located. If omitted, it defaults to ImageDir or WorkDir. If specified, it MUST be a relative path from HtmlDir or WorkDir. (See the example above.)
At the server console run:
sys:/mrtg/bin/RunMrtg.ncf
several times. By the third time it should run without showing error messages on the console screen.
This should create:
- A HTML page in the HtmlDir (or WorkDir) directory for each monitored device, - Several .png icons in the ImageDir (or WorkDir) directory, - Some log file entries in the LogDir (or WorkDir) directory.
Edit sys:/mrtg/bin/MakeMrtgIndex.ncf. Change the highlighted <path> shown in the following example to match the value entered for HtmlDir (or WorkDir) in a previous step.
perl --noscreen sys:/mrtg/bin/indexmaker.pl sys:/mrtg/bin/Mrtg.cfg > <path>/index.html
Create an index.html page linking the seperate device HTML page(s). At the server console, run:
sys:/mrtg/bin/MakeMrtgIndex.ncf
This will create index.html in the HtmlDir (or WorkDir) directory.
Optionally, configure your Web Server to permit access to the directory specified in HtmlDir (or WorkDir) to view the MRTG graphs remotely via your web server at, for example:
http://<ip or dns>/mrtg/[index.html]
Set the directory, pointed to by the HtmlDir (or WorkDir) setting, to 'Purge Immediate'.
Optionally, create a CRON Scheduler entry to execute the RunMrtg.ncf file on a frequency appropriate for the server environment and information desired.
The following entry in the sys:\etc\crontab file will execute MRTG every five minutes:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * sys:\mrtg\bin\runmrtg.ncf
The CRON Scheduler (cron.nlm) can be started automatically by adding it in AUTOEXEC.ncf or, manually loading it at the server console.
Finally, read the MRTG documentation (sys:/mrtg/doc) for much more detailed configuration/usage information.
Welcome to MRTG!!
Read the MRTG documents, Perl documents or, finally, submit questions to the MRTG User forums.
For NetWare specific issues, submit questions to the Perl forum at Novell Developer Forums.
In addition to the rateup.c and Makefile.Netware supplied with the MRTG release, you will also need:
Both Graphics and ZLib Libraries can be obtained from http://www.myuli.de/internet/opensource.html.
Edit the Makefile.Netware file as required to match your installation paths to the above libraries.
For NetWare specific files, see http://normw.gknw.com/mrtg_nw/.
For NetWare specific issues, submit questions to the Perl forum at Novell Developer Forums.
The MRTG for NetWare exists largely through the efforts of Guenter Knauf and Norm W.
Norm W.