Read SNMP OID

Read SNMP Info (specified OIDs) from Routers and Switches, and save the output in a .txt file.

Requires

  • Python (tested on Python 3.8.6)
  • Modules
    • snmp helper
    • time
    • sys
  • You can use pip install -r requirements.txt to install all modules

Supports

Routers and Switches Cisco with SNMP version 2c community configured

Limitations

  • Same community for all devices in devices_list.txt
  • Works for SNMP version 2c
  • Run on port UDP/161, if necessary you can chance that on code (snmp_port = your_port)

Usage

  1. Install Python and the modules
  2. Download this repository or copy read_snmp_oid.py, snmp_helper.py and devices_list.txt to the same folder
  3. Run "python read_snmp_oid.py community OID (Ex. python read_snmp_info.py brainwork .1.3.6.1.2.1.1.5.0)

output

Use case

To collect specific SNMP information for a list of devices

Getting Help

If you are having trouble or need help, create an issue here

Credits and references

All credits to Kirk Byers for making SNMP Helper

View code on GitHub
  • Owner

  • Contributors

    +1Github contributor
  • Categories

  • Programming Languages

    Python
  • License

    MIT License

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.