Monitoring your IT gear: the MRTG story

About six years ago I was working as a system manager at a university in the UK. This 20,000 person outfit had a single 64 Kbit Internet link. The campus itself was well connected within, so you can imagine what happened on that Internet link. During working hours, it was almost unusable as everybody was working hard to squeeze some bytes through it. Working in the central IT services group, I figured it might help people to know whether the link was slow because it was full or because it was broken. After some initial experiments with shell scripts-snmpget and gnuplot-I wrote my first big Perl script: the Multi Router Traffic Grapher (MRTG). This tool ran on our Web server. Every 5 minutes it read the inbound and outbound octet counters off our Internet gateway router. By building the difference between two consecutive readouts and dividing the result by the elapsed time, it could determine the average data rate on the link for the past 5 minutes. It logged this data and drew graphs for a Web page, where everybody could readily see the link's state. At the time, we were also discussing the need for a faster link with university management. MRTG provided us with exactly the type of easy-to-understand information required to sell a faster link to management.