ShowCollector

published

Simple script to do a show command on a bunch of Cisco IOS or NX-OS switches and create files that capture the output.

The script requires Python3 and netmiko to automatically install the dependecies do: pip3 install -r requirements.txt

Usage:

ShowCollector.py with the following parameters:

  • --user [username to login in the switches]
  • --password [cleartext password | ask]
  • --switch [hostname | ip address | "," separated list of values | file.txt with switches in rows]
  • --type [switch type nxos | ios]
  • --command [the show command to execute between ""]

The script gives output in individual files using the switch name + the command.

Examples:

  • ShowCollector.py --user john --password C1sco12345 --switch 1.1.1.1 --type nxos --command "show version"

  • ShowCollector.py --user john --password ask --switch 1.1.1.1,2.2.2.2 -type ios --command "show running-config"

  • ShowCollector.py --user john --password C1sco12345 --switch list.txt -type nxos --command "show ip bgp neighbor"

View code on GitHub
  • Owner

  • Contributors

    +2Github contributors
  • Categories

  • Products

    NX-OS
  • Programming Languages

    Python
  • License

    Apache License 2.0

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.