Introduction
MRTG is a wonderful tool. You can use it to monitor traffic on your router or leased server located at remote IDC. Since it is written in Perl and some code in C language, it is portable and high performance tool.
What is MRTG?
From the mrtg(1) man page:
The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network-links. MRTG generates HTML pages containing GIF images which provide a LIVE visual representation of this traffic.
Please note following discussion based upon Red Hat Linux Enterprise version 3 update 2 and RHEL v4.0.
What is SNMP and why should I care?
SNMP is Simple Network Management Protocol. It is used to manage IP network devices such as servers, routers, switches and more. Sysadmin can find or manage network performance, solve the problem or even optimize network further with MRTG. For more information on official UNIX/Linux SNMP please see UCD-SNMP/NET-SNMP Tutorials and an excellent resource at Snmplink.org
Assumptions of Knowledge
I have made the following assumptions about your knowledge before reading thtutorial and discussing the hardware/software you will need to use:
- Linux distribution - RHEL 3.x/ 4.x+. If you are using CentOS or RHEL 6.x, please see this updated tutorial here.
- Install MRTG using rpm command. If you are looking for source installation then visit author's web site here. This page has an excellent set of information on installing mrtg from source.
- Required RPMs
- mrtg
- snmp
- snmp-utils
- Installations were tested on Red Hat Enterprise Linux version 3 update 2.

