Switch Power Alarm
Other Open Source Projects
These PERL scripts help us manage our flock of Cisco switches, routers, and VPN concentrators.
Auto-Save takes a list of devices as arguments and compares startup-config to the version saved on the tftp server. If they are different, updates the version saved on the tftp server and stores both 'before' and 'after' copies to a changetree.
Count-Associated-Clients takes a list of Cisco WLC and WiSM as arguments and uses CISCO-LWAPP-DOT11-CLIENT-MIB::cldcClientStatus to count the number of associated WiFi clients, produce a report, and append to a log file.
Find-QOS-Drops takes list of devices as arguments and looks for ports which have dropped QoS-tagged frames.
Mod-Config takes a file name and a list of devices as arguments; it uploads the file to each target, merging it with running-config.
Mod-Interface takes a file name and a list of devices as arguments, plus numerous command-line switches. It replaces wildcards in the file name with VLAN and port-specific parameters, and then uploads the result to each target, merging it with running-config. The goal is to allow one to apply policy to switch ports -- this is one of the most feature-rich scripts in the Netops collection.
We run Redundancy-Testing from cron every month to test the redundant aspects of our packet infrastructure. This script employes red-reboot (see below) to reboot a list of devices in order, waiting to see that the rebooted device returns to life before continuing. While a device reboots, the script pings an address located *behind* the rebooting device, tracking how many pings are lost when the device goes down and how many are lost when the device comes back up again. The script logs the results and produces a report. The next day, a human analyzes the network management station's logs to see whether or not the redundant packet infrastructure performed as expected.
Red-Reboot performs the heavy lifting for redundancy-testing (see above).
Proxy-Ping-Alarm takes a list of addresses and a VRF name as arguments, uses the CISCO-PING-MIB to ping those addresses via the VRF, produces a report, and alarms if it detects problems. The point is to watch interfaces living in a VRF which is inaccessible from the management host.
Save-Config takes a list of devices as arguments and uses tftp to save their config files to a change tree.
Show-CDP-Neighbors takes a list of devices as arguments and produces a report listing those devices CDP neighbors.
Switch-Power-Alarm watches power utilization on switches, warning if a switch exceeds a defined percentage of its power budget. Switches typically exceed their power budget if their power supplies are not sized appropriately to support their installed modules or attachedattached PoE devices.
Unconf-Modules-Alarm takes list of devices as arguments and looks for ports which belong to VLAN1 or which do not have 'portfast' enabled on them or on which PoE is disabled, producing a report and e-mailing if needed.
Unsnooped-Vlans-Alarm takes list of devices as arguments, looks for VLANS for which DHCP snooping has not been enabled, and e-mails interested parties if it finds any.
Upgrade-IOS takes an image file name plus a list of devices as arguments and uses SNMP to upgrade the OS sitting on the devices' flash. The script has been tested on: MSFC1, MSFC2, C5KRSM, cat650x, cat450x, cisco2620, cisco3640, cisco3900, cisco7206VXR. It does not support Nexus.
Write-Mem takes a list of devices as arguments and performs the SNMP equivalent of 'copy running-config startup-config'.
Other Open Source Projects
Here are links to other sites which are hosting scripts for managing Cisco devices.
|Last modified: 2017-04-28|