home news blogs forums events research newsletter whitepapers careers


Network Computing Network Computing Network Computing
HOT PICKS

IMMERSE YOURSELF:

SOA

  |

Data Center

  |

802.11n

  |

Data Privacy

  |
APO  |

Virtualization

  |

NAC

  |

Security

  |

Network Mgmt

  |

Enterprise Apps

  |

Storage & Servers



Network + Systems Management
W O R K S H O P  
MRTG Monitors What's Brewing<

  April 3, 2003
  By Bruce Boardman


TOC Issue TOC
Printer Print full article
Printer Print this page
Printer Download as PDF
E-Mail E-Mail this URL
Discuss Discuss this article
flame author Flame the author
 
  In this article
arrow
Introduction
arrow
Stringing It Together

What if your network-monitoring tool could track the surf at the beach and check your beer's temperature while keeping watch over your network's performance? The Multi Router Traffic Grapher (MRTG) can do all that with the right configuration files.

MRTG is a public-domain, do-it-yourself network-monitoring tool that can track the performance of network devices, systems, applications and environmental conditions, such as temperature and power.

The MRTG tool generates HTML pages with PNG (Portable Network Graphics) images for a live, graphical view of traffic conditions. You can configure it to monitor any SNMP variable, such as the system load on a server or a couple of hundred interfaces on your network. It's even been used to monitor the waves and tides in Southern California, as well as the amount of beer left in Network Computing's VAX Keg. (The keg has left the building, but you can view it in all its glory.)



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.

Variable Value

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 1.3.6.1.2.1.2.2.1.10) and ifOutOctets (1.3.6.1.2.1.2.2.1.16)--that record the number of bytes coming into (ifInOctetes) and out of (ifOutOctets) a single interface.



Sample Portion of Configuration File

click to enlarge

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.


start top Introduction Stringing It Together 





Ready to take that job and shove it?

Function:

Keyword(s):

State:
SPONSOR
RECENT JOB POSTINGS
CAREER NEWS
Go beyond Google and get vertical. These specialized search sites will help you find the business information you need -- fast.

Ari Balogh was named to the post of chief technology officer as the companys for a "realignment" of employees.










InformationWeek U.S. IT Salary Survey 2008
Salaries for business technology professionals are falling. Here's what you need to know in order to make good hiring decisions and personal career choices. Purchase Today: $299
 
ROLLING RIGHT ALONG
Follow key Network Computing Reviews from conception to completion. This Week: Holistic APM.



Network Computing Reports Emerging Enterprise Podcast Series: Secrets to Success








TechSearch


Microsite of the Week


Powerful Information at Your Fingertips



techweb
Online Communities TechWebInformationWeekLight ReadingIntelligent EnterprisebMightyNetwork ComputingDark ReadingDigital LibraryWall Street & Technology
Byte & SwitchNo JitterInternet EvolutionLight Reading's Cable Digital NewsContentinopleUnStrungBank Systems & TechnologyAdvanced TradingInsurance & Technology
Face-to-Face Events
InteropWeb 2.0 ExpoWeb 2.0 SummitVoiceConBlack HatCSISoftwareEntrprise 2.0 ConferenceGTEC
Mobile Business Expo
InformationWeek 500 ConferenceBuy Side Trading XchangeBuy Side Trading SummitBank Executive SummitInsurance Executive SummitTelcoTVEthernet ExpoOptical Expo
Magazines  
InformationWeekWall Street & TechnologyInsurance & TechnologyBank Systems & TechnologyAdvanced TradingMSDNTechNetSmart EnterpriseThe Architecture JournalDatabase Magazine
 
Research & Analyst Services  
Heavy ReadingInformationWeek ReportsInformationWeek Analytics
 
   
   
App Infrastructure   |   Messaging & Collaboration   |   Network & Systems Mgmt   |   Network Infrastructure   |   Security  |   Storage & Servers   |   Wireless   |   Enterprise Apps
About Us  |  Contact Us  |  Site Map  |  Technology Marketing Solutions  |   Briefing Centers
Copyright © 2008  United Business Media Limited  |  Privacy Statement  |  Terms of Service  |  Your California Privacy Rights