First
Unzip MRTG to C:\mrtg2.9.17 on the WindowsNT machine of your choice.Next
Install Perl on the same Windows NT machine. You might want to make sure that the Perl binary directory is listed in your system path.
C:\Perl\bin;%SystemRoot%\system32;%SystemRoot%;...
You can manually check this by going to [Control Panel]>[System]>[Environment]
To see if everything is installed properly you can open a Command Shell and go into c:\mrtg2.9.17\bin. Type:
perl mrtg
This should give you a friendly error message complaining about the missing mrtg configuration file. Now, you have suc>
cessfully installed mrtg and perl.
CONFIGURING MRTG
Now it is time to walk create a configuration for mrtg.燘ut before we begin you need to know a few things, take an opportunity to gather the following information:
The IP address or hostname of the and snmp port number, (if non standard), of the device you want to monitor.If you want to monitor something other than bytes in and out, you must also know the SNMPOID of what you want to monitor.Finally you need to know the readonly SNMP community string for your device.� If you don't know it, try public, that is the default.
For the rest of this document we will be using device 10.10.10.1 ( a CISCO Catalyst 5000) with Community string public.� We are interested in monitoring traffic, and the CPU Load. Let's begin.
The first thing we do in setting up mrtg is by making a default config file. Get to a cmd prompt and change to the c:\mrtg2.9.17\bin directory. Type the following command:
This creates an initial MRTG config file for you. Note that in this file all interfaces of your router will be stored by number. Unfortunately these numbers are likely to change when ever you reconfigure your router. So in order to work around this you can get cfgmaker to produce a configuration which is based on Ip numbers, or even Interface Des criptions. Check the cfgmaker manpage
If you get an error message complaining about no such name or no response, your community name is probably wrong.
Now, lets take a look at the mrtg.cfg file that was created.
In Perl a # is a comment, synonymous with REM in DOS.
Add the following to the top of the mrtg.cfg file:
WorkDir: D:\InetPub\wwwroot\MRTG
This is where the web pages are created, usually a web root.
###################################################################### # Des cription: LCP SUWGB # Contact: Administrator # System Name: LCBridge # Location: Here #.....................................................................
TargetDevice's IP Address:Interface Number:Community:IP Address