Thursday, February 22, 2018

I wrote a scripty-poo to document the interface configuration and status of Procurve switches

We're ripping out the old Procurves, and putting in some new hotness.

But before we do this we need to know about the network, and our customer doesn't know about their network.

It's a bit of a pickle, considering we're working on just under a hundred switches that are fairly remote. So completely remote that we want to get this right the first time so nobody has to go back.

Here's the script: https://github.com/thewozza/HP_Procurve_Interface_Documentator

It drives into an HP procurve and grabs the interfaces to note the current up/down status and the duplex. Of course in our case, it does this about 100 times so I don't have to.

Then it scans the VLAN config and figures out what VLANs are associated with a particular port, and whether or not they're tagged.

THEN it wanders through the switch logs looking for up/down events which could indicate that a port that is off at the time of the scan was UP at some point, in which case we care about it.

Lastly through some python magic that I don't understand it barfs all this out into an excel spreadsheet ready for human consumption.

The intention is that we can use this excel spreadsheet (print it out maybe?) when we're deploying the new switches. It will help us understand what ports are actually important, and what ports can be just thrown together in the usual VLAN.

It also helps us understand more completely what all of you know, that we're using fewer switch ports every year and those closets that required 4 switches 10 years ago only need two now.

So maybe this will help you in your search for data, or maybe you can tear apart my spaghetti code and make into something that is actually useful. Good luck!



No comments:

Post a Comment