Giter Club home page Giter Club logo

pysnmp_mibs's Introduction

pysnmp_mibs

A collection of IETF & IANA & network vendor specific MIBs pre-compiled for PySNMP

pysnmp and pyasn1 are great libraries for working with SNMP in Python. Ilya Etingof (the author of the above projects) made a pypi package called pysnmp-mibs, which contains standard mibs, however if you need to work with some proprietary network hardware, you'll need to compile your own files. The process is not always straightforward, and this repo supposed to help you getting there in an easier way.

##Vendor resources:

##Usage:

> git clone https://github.com/oriordan/pysnmp_mibs/
> python
>>> from pyasn1.type import univ
>>> from pysnmp.entity.rfc3413.oneliner.mibvar import MibVariable
>>> from pysnmp.smi import builder, view
>>> mibBuilder = builder.MibBuilder().loadModules('SNMPv2-MIB')
>>> mibViewController = view.MibViewController(mibBuilder)
>>> x = MibVariable(univ.ObjectIdentifier('1.3.6.1.2.1.1.1')).resolveWithMib(mibViewController)
>>> x.getLabel()
('iso', 'org', 'dod', 'internet', 'mgmt', 'mib-2', 'system', 'sysDescr')
>>>

##Hints:

Sometimes network devices are not sending the traps according to their own MIB specification. In order to minimize OID resolution issues, some compiled mibs are altered:

  • IF-MIB.py: Allowing zero interface index (because Cisco voice gateways are "special")
  • BGP4-V2-MIB-JUNIPER.py: Using InetAddressIPv6 for jnxBgpM2PeerLocalAddr and jnxBgpM2PeerRemoteAddr
  • CISCO-BGP4-MIB.py: Dropping cbgpPeer2Type from cbgpPeer2Entry
  • CISCO-DIAL-CONTROL-MIB.py: Using Integer for cCallHistoryConnectTime and cCallHistoryDisconnectTime

pysnmp_mibs's People

Contributors

oriordan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.