M.R.T.G. for NetWare - Getting Started
Contents
Overview
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.
Why NetWare Could Not Run MRTG Previously
Earlier versions of NetWare could not run MRTG natively for
several reasons:
Absence of NetWare OS support in
the MRTG package,
A NetWare server commandline
length limitation,
Absence of the Rateup executable
(Rateup.nlm),
A standard installation method,
Problems with NetWare's implementation of Perl.
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.
License
MRTG is freely available under the terms of the GNU
General Public License.
Warranty
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.
Requirements
Perl 5.8 for NetWare with latest
Perl Updates (June, 2004 or later)
NetWare 6.0 w/ SP5 or NetWare 6.5.
A copy of the MRTG Package
(v2.10.15 at time of writting)
Three .ncf files to execute the
Perl scripts at the NetWare server console
A copy of the Rateup NLM
(Pre-built or compiled)
Optionally, any NetWare supported Web Server (Novonyx, Apache
1.3 or 2.0)
For copies of the .ncf files and Rateup NLM, see NetWare
Support below.
MRTG Installation
Copy the three (3) .ncf files, rateup.nlm and
Mrtg_NetWare_Get_Started.html to a local directory.
Copy the modified mrtg.pl script in the patches directory to a local directory.
Check Possible problems in NetWare Perl5. At the time this package is released, there are two likely 'issues' with NetWare Perl
(that are known of and relevant), and each has a 'work-around' as noted below.
a. Locate the following file:
SYS:/Perl/lib/File/spec.pm Line 13 should read: NetWare => 'NW5'
Adjust the line as necessary.
b. The following message MAY be
displayed on the console: "Use of uninitialised value in split
at SYS:/Perl/lib/File/Spec/NW5.pm line 104" To correct it,
either use the envset console command to create a 'path' environment
variable, or locate the following file:
SYS:/Perl/lib/File/Spec/nw5.pm Change line 103 from: my $path =
$ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'}; to: my $path =
$ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'} || "";
The
Perl 'issues' noted have been raised with the product maintainers
and permanent fixes are expected in the near future.
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:
in* 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
ranslate* to SYS:/Mrtg/translate/ All files. See Note 2.
Note 2: For English only language support, all ranslate
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.
Configuring MRTG
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: e.g WorkDir: sys:/mrtg/work
or
+ HtmlDir: e.g HtmlDir: sys:/mrtg/html
+ ImageDir: e.g ImageDir: sys:/mrtg/work
+ LogDir: e.g LogDir: sys:/mrtg/logs
IconDir: 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
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 > /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:///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:etccrontab file will execute
MRTG every five minutes:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * sys:mrtgin
unmrtg.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!!
Troubleshooting
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.
Compiling Rateup.nlm
In addition to the rateup.c and Makefile.Netware supplied with the
MRTG release, you will also need:
Metrowerks CodeWarrior with
NetWare Support or GCC Compiler (v3.0.3 or later) with
NlmConv Utility
Novell LibC NDK (February 2004 or
later)
GD Graphics Library (v1.8.4 or
later)
LibPNG Graphics Library (v1.2.5 or
later)
ZLib Library (v1.1.4 or later)
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.
NetWare Support
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.
|