Browsed by
Month: September 2012



Ok so recently I’ve been motivated to post up some of the work that I’ve been doing in my spare time.

First up is a small python script that I wrote. It is ugly and one day i will go back and clean it up. It was literally my “Hello World” into python. So it is kinda cob’d together.

Basically, I wanted something that would alert me when a switch went down or there was an unusual amount of traffic between two switches. So I set out to remotely monitor bandwidth utilization in my switches. After a bit of google’n I stumbled upon SNMP. After a bit of research I figured I could make that work.

Now that I was able to pull in the bandwidth utilization. I started building the code to look at all the switches. About three switches into the config file that I was creating I thought this isn’t nearly cool enough. So, I ended up working a bit and made a SNMP spider. It uses Cisco discovery protocol to find each switch’s neighbor. End the end all you have to do is fire up the script and point it to any of your switches. It will spider through the entire network and save the switch information as it discovers it.

What good is having all this sweet information without have some ability to display it in a killer manner. In comes a library called CherryPy. With CherryPy I was able to display all the switch information. From there I wanted to show some sort of link information at a glance. Using jsPlumb i was able to draw connections between the switches and show the utilization. I also added the ability to drag and drop the switches around so you can look at the entire topology however you like.

Here is a short video showing the interface.

You can find the code in my github account.

// lance