MRTG is most useful for network administrators because it gives them a handle on how their network resources are being used. Many corporations and organizations run MRTG to monitor their networks and applications. There's an active community of users and developers regularly providing free upgrades and extensions to MRTG, which was written in PERL in 1994 by Tobias Oetiker of the National Environmental Research Institute of Denmark as a hack for tracking the load on his organization's Internet link. An MRTG user at Cisco Systems, Dave Rand, later improved the efficiency of the MRTG code by writing a C module for it.
You can get MRTG code from the Free Software Foundation's GNU Project under a General Public License. The trade-off with free software, of course, is that you get what you pay for. The price you pay is the time you spend learning and implementing it, and the maintenance cost is the time you spend keeping it running. This may be true with commercial software, too, but at least there's a vendor to blame when a product doesn't work. With MRTG, and other free code, you're on your own.
MRTG runs on Unix, Linux and Microsoft Windows platforms. It works best on Solaris, Linux and Win32 platforms, such as NT, Windows 2000 and XP. Running MRTG on Win98 or ME may be more trouble than it's worth: Not only do you have to install SNMP, but the MRTG configuration is different. And then there's the instability of the Win98 and ME platforms. You'd be better off upgrading to Linux or Windows 2000/XP rather than trying to monitor Win98 and ME with MRTG.
You don't have to be an expert in C or PERL to get started with MRTG. There are plenty of cookbook tutorials to help you set it up to monitor a few interfaces. All you need to know is the IP address and community string of the devices you want to monitor. If you want to use MRTG for more advanced monitoring tasks, then you'll need to know PERL.
Installing PERL is straightforward. Just run a setup script on NT or an RPM package on Linux. The MRTG site points to a free PERL package from ActiveState, ActivePerl, which is as easy as installing a Windows application. The HTML and PNG output, meanwhile, is compatible with any browser or Web server.
Here's how MRTG works: It periodically collects two values using SNMP and displays them over time via an HTML page and PNG images. It does this by using SNMP GETs to retrieve SNMP counters--ifInOctets (OID 18.104.22.168.22.214.171.124.1.10) and ifOutOctets (126.96.36.199.188.8.131.52.1.16)--that record the number of bytes coming into (ifInOctetes) and out of (ifOutOctets) a single interface.
These values, called targets, can be just about any device, including a router or a VAX keg. The good news is that MRTG comes with predefined MIB labels to shorten the onerous task of editing and remembering object identifiers (OIDs) such as ifOutErrors, ifInErrors and ifAdminStatus.
The data is then plotted as a line graph in two different colors, blue and green by default, with a corresponding legend showing minimum, maximum and average values. The end result is an easy-to-understand, current condition of a monitored device or interface.
The MRTG graph displays weekly, monthly and yearly averages, which are rolled up from daily, five-minute data collections. The weekly average is based on half-hour averages, which means that each point of the weekly graph is an average of six, five-minute collections. Similarly, the monthly graph shows a two-hour average of the weekly data, while the yearly one shows a daily average of the monthly data. The rate at which the data is collected and averaged is similar to the rate at which most commercial monitoring tools operate, though some commercial tools don't explain all the values as clearly or in as much detail as MRTG does.
But here's the trade-off: Unlike commercial performance-management software from vendors such as Concord Communications and ProactiveNet Software, MRTG does not maintain a database of historical data. The information is stored in a flat ASCII file, which is deleted once it's been rolled into weekly, monthly and yearly averages. For example, you wouldn't be able to get specifics on a particular day's peak from the data displayed in the monthly graph. If you want to keep granular data from MRTG, there is an add-on, RRDtool (Round Robin Database tool), that lets you store your data long term.