Cacti, MRTG, RRD, netflow & SNMP-related stuff

Last update: 18th September 2007

Mostly for work, I get to do a fair bit of fiddling with network statistics software of various sorts. Little scripts and "glue" tools are the stock-in-trade of this type of software, so I thought I'd collect together any useful ones I have in here. These days it's mostly for Cacti rather than MRTG, but both work in a similar enough way that some of this will be applicable.

Aside from the 'little' scripts, there's one slightly larger one which I've been working on in 2005, which is the weathermap, based on the work of several others.

The ones that aren't links yet are things I've done recently, or am in the process of doing, and haven't had a chance to write up yet. Feel free to nudge me if you are particularly interested in seeing one of them. If anything here makes your life or your job so much more enjoyable, feel free to share the joy, too.

PHP Weathermap

Sample Map from PHP Weathermap

Sample output from php-weathermap, using data collected by Cacti and MRTG.

RRD Sparklines

A sample sparkline generated from RRD data

A small, embeddable stripchart generated from rrdtool XML output, collected by Cacti.

PHP Weathermap New Website - 6th June 2007 - v0.92
A newer, PHP-based version of the script below. Makes images like the to the right. Many more features than the perl version, and still being maintained.
Cisco Icons, with transparency Sept 29th 2006 - v0.2 (735KB)
Cisco make available a set of icons for standard network devices. I have a set hosted here which is converted (with their permission) into PNGs, with transparency where appropriate. This is a much more useful format for things like Weathermap, by a strange coincidence!
Cacti 'QuickTree' plugin Sep 26th 2009
Cacti 'Titlechanger' plugin Jul 31st 2009
Cacti 'SuperLinks' plugin Sep 8th 2007
A new, improved version of the Links plugin below, which adds many new features: access-control, any number of tabs, nice tab graphics...
Cacti 'Links' plugin Mar 15th 2006
A tiny plugin for Cacti to allow you to integrate your own web applications into the Cacti UI.
Cacti 'Devices' plugin Mar 16th 2006
Another small plugin for Cacti to allow you to give users a read-only view of the status of network devices.
Qmail & djbdns monitoring via SNMP Sept 14th 2005
plus Cacti templates to graph it
ipfw dynamic rule monitoring via SNMP June 20th 2005
plus a Cacti template to graph it
Generating stripcharts, sparklines and other embeddable graphics from RRDs
(like that little fella to the right there) Making a 'network dashboard'. Here's the original source for the sparkline idea.
Build your own BSD-based netflow probe
Use port mirroring and BSD's netgraph system to get information about data flows in your network using the standard NetFlow protocol.
Perl-based Cacti Weathermap Jan 28th 2005 - v1.1.1hj3 - FINAL VERSION
Based on the work of Panagiotis Christias and GRNET. Extended to generate DHTML container pages, read directly from RRD files, and some other smaller changes. No longer developed, as I prefer to work on the PHP version
auto-overlib.pl March 11th 2005
A small but useful script that takes a weathermap config file with references to Cacti RRD targets and automatically adds in all the INFOURL and OVERLIBGRAPH lines it can, where they don't exist. You'll need to edit the script to allow it to log in to your Cacti database. Requires the Perl DBI and DBD::mysql modules. Should work with both PHP and perl versions, but not tested with PHP one.
Copyright 1994-2005, by Howard Jones. howie@thingy.com