Hi There.
We have decided to shut all non-trunk switch ports that have been inactive for over 14 days. Our environment includes roughly 250 switches (well more, but only see 250 as a lot are stacked) ranging from 2960/g/s/x/cx's, 3750's, 9200/9300's and some nexus switches. Using my NMS I can see I have roughly 2200 interfaces that will need to be shut down. Obviously far too many to do manually.
I have been looking at the tm_suspend_ports.tcl event manager process and modifying it to not include trunk ports. One question I have with this though, does this only work when event manager sees the interface go down? I.e. will it work for ports that were already down before the script was implemented?
If it has to see the interface go down, then I will need to somehow do an initial shut of all ports that meet the requirements. I was leaning towards ansible for this (we already have it setup in our environment). I used NeDi (our NMS) to run a query for the ports that need to be shut and I can export this as csv. I was thinking of trying to parse these to ansible and running an ansible script to shut those interfaces. I haven't done much programming since I quit my computer science degree 15 years ago though, so not sure how I'd go with that.
Alternatively, we have an SNMP Write community that could potentially be utilised? Again though, the programming to ensure it only shuts the correct port may be the hard part.
Any tips on best path to take?