mrtg: Multi Router Traffic Grapher (1.0)

Created by <oetiker@dmu.ac.uk>
This program is distributed under the GNU copyleft.

Description

The Multi Router Traffic Grapher can be used to monitor a number of Internet links. It produces a html page which contains 3 graphs, showing the load on the link over the last 24 hours, 7 days and 365 Days. Check The stats of DMU's Internet Link see a sample output.

The program runs as a cron job and is therfore quite robust to system crashes. It uses snmpget from the cmu-snmp distribution to collect data from the router. The graphs are produced with ppmtogif from the netpbm package.

Man Page

Command line:
mrtg mrtg.cfg
Synopsis:
This tool, when started up regularly, through a crontab, creates a daily, weekly and yearly graph, representing the incoming and outgoing traffic on a snmp manageable router. The tool also produces a HTML document around the graphics for easy access on a web server.
Configuration:
The operation of the "mrtg" is governed by entries in the configuration file. The filename of the configuration file must be specified as a command line argument when calling "mrtg"
Installation:
Adapt the configuration file to your needs. Then put up a crontab which starts "mrtg" every five minutes. If for some reasons mrtg misses on reading, this doesn't matter, it will automatically take that into account.

Example Config File


# Multi Router Traffic Grapher -- Configuration File
#######################################################################
 
# General Configuration ###############################################
#######################################################################
 
WorkDir: /usr/local/www/data/dept/admin/dld/lin/netcomm/traffic
snmpget: /home/oetiker/bin/snmpget
mibfile: /home/oetiker/etc/mib.txt
ppmtogif: /usr/local/bin/ppmtogif 
 
# Configuration for the CISCO Gateway #################################
#######################################################################
 
IP[jips]: 146.227.1.248
MaxBytes[jips]: 8000   
Title[jips]: Traffic Analysis for DMU's Internet Gateway
 
Comment[jips]: Our Internet link curently runs over a 64Kb X.25 Link.
  This gives a maximum throughput of 8 KBytes per Second.
 
ifOut[jips]: interfaces.ifTable.ifEntry.ifOutOctets.6
ifIn[jips]: interfaces.ifTable.ifEntry.ifInOctets.6 

#
# You can add other routers here. Just pick another identifier.
#


The latest version of this program is available from Tobias Oetiker <oetiker@dmu.ac.uk>