skip to navigation
skip to content

shellsnmp 0.1.7

Shamelessly (ab)using NET-SNMP shell commands for a quick-and-dirty Python SNMP lib

Why

  • I’m not fond of the pySNMP API
  • snimpy requires loading libffi-dev and libsmi-dev (i.e. root privs) on the system
  • It’s fast enough

Usage

Be sure you have MIB files loaded on your system. You can download them from Cisco’s FTP site like this… wget ftp://ftp.cisco.com/pub/mibs/v2/MIB-NAME.my

from shellsnmp.Poller import SNMP

snmp = SNMP(community='public', host='172.16.1.3')
status, time = snmp.bulkwalk(mibfile='/path/to/IF-MIB.my',
    oidspec='ifOperStatus')

Note that only bulkwalk() has been implemented at this time.

Installation

pip install shellsnmp
 
File Type Py Version Uploaded on Size
shellsnmp-0.1.7-py2-none-any.whl (md5) Python Wheel 2.7 2016-11-29 4KB
shellsnmp-0.1.7.tar.gz (md5) Source 2016-11-29 4KB