MRTG Configuration

Introduction

Multi Router Traffic Grapher (MRTG) is free software for monitoring and measuring the traffic load on network links. It allows the user to see traffic load on a network over time in graphical form. Originally developed by Tobias Oetiker and Dave Rand to monitor router traffic, it has developed into a tool that can create graphs and statistics for almost anything. Thus routers are only the beginning; MRTG can be used to graph all sorts of network devices as well as everything else from weather data to vending machines (essentially anything that can be queried using SNMP). See http://en.wikipedia.org/wiki/MRTG for introductory information.


MRTG is written in Perl and works on Unix/Linux as well as Windows and even Netware systems. MRTG is free software licensed under the Gnu GPL.


MRTG uses the Simple Network Management Protocol (SNMP) to send requests with two object identifiers (OIDs) to a device. The device, which must be SNMP-enabled, will have a management information base (MIB) to look up the OIDs specified. After collecting the information it will send back the raw data encapsulated in an SNMP protocol. MRTG records this data in a log on the client along with previously recorded data for the device. The software then creates an HTML document from the logs, containing a list of graphs detailing traffic for the selected device.


However, MRTG can also be configured to run a script or command, and parse its output for counter values. The MRTG website contains a large library of external scripts to enable monitoring of SQL database statistics, firewall rules, CPU fan RPMs, or virtually any integer-value data.


The following guidance might be useful in helping to configure MRTG on a Linux server.


My MRTG Configuration

Essentially I followed the standard installation procedure as described in the MRTG 2.16.2 Linux/Unix Installation Guide link below.


General Links

The following general links are useful references when setting up MRTG:


URLSummary/Description
http://oss.oetiker.ch/mrtg/ MRTG Home page
http://oss.oetiker.ch/mrtg/doc/mrtg-unix-guide.en.html MRTG 2.16.2 Linux/Unix Installation guide
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch23_:_Advanced_MRTG_for_Linux Quick HOWTO : Ch23 : Advanced MRTG for Linux
http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/mrtg/ Red Hat Linux MRTG Configuration HOW-TO
http://en.gentoo-wiki.com/wiki/MRTG MRTG - Gentoo Linux Wiki