The power of MRTG …

The Multi Router Traffic Grapher (MRTG)
is an elegent piece of Open Source software. It is amazingly
simple, yet powerful … a great combination. I first became
aware of MRTG years ago when working on network management
software. The foundation for a lot of network management and
monitoring is the Simple Network Management Protocol (SNMP)
protocol. MRTG was designed to provide trend graphs of SNMP
variables that were being polled. Well, it actually started as a
tool to graph some specific variables – the Interface statistics of
data going in and out of a network Interface.

What is great about MRTG is that is was then extended to go beyond it’s
roots … and into a couple of different directions. The first
area that I really like is that I can add scripts to MRTG that return
values to be graphed … anything that I want. You can only graph
two variables per graph … but it can be any type of data.

I have now written a variety of MRTG scripts to scrape web interfaces
for a variety of devices and applications. For example, I wrote a
MRTG script to scrape the status screen of my ActionTec GT701 DSL
modem. With this ActionTec MRTG script I can now see up to date trend graphs of the traffic going through my DSL modem.

Another example is this NoCat MRTG script that I wrote for the NoCat
project – an Open Source network authentication application. It
also scrapes the web page generated by the NoCat Gateway
software. In both of these examples, I am able to extend the
functionlity of MRTG using Perl and wget …

Now I’m also using MRTG as a primitive OLAP tool … to graph the
results of queries to a MySQL database. In the backend systems
that run our wireless network –
– I am writing records to a SQL table to track our sales of Internet
Access. I’ve now written a quick Perl script that does a query of
the database, finds all of the records of sales this month, and then
calculates the revenue that has been generated … and outputs it in
the correct format for MRTG. And so now, I have several graphs
that show our month-to-date sales so that I can see our progress each
day … and throughout the day. What is interesting is to be able
to see the trends of when people purchase Internet Access …

MRTG allows me to easily visualize any type of information … in a very simple and elegent way.

Leave a Reply