Python snmp using shell calls
Project description
#########
shellsnmp
#########
*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
License and Copyright
---------------------
Licensed MIT
Copyright 2016 - David Michael Pennington (mike /|at|\ pennington.net)
.. _`pySNMP`: http://pysnmp.sourceforge.net/
.. _`snimpy`: https://github.com/vincentbernat/snimpy
shellsnmp
#########
*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
License and Copyright
---------------------
Licensed MIT
Copyright 2016 - David Michael Pennington (mike /|at|\ pennington.net)
.. _`pySNMP`: http://pysnmp.sourceforge.net/
.. _`snimpy`: https://github.com/vincentbernat/snimpy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shellsnmp-0.0.9.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for shellsnmp-0.0.9-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 653081b6a5382bf708e75c12e5433859db329bbc6e89737a8a7a92bbf25a4f5c |
|
MD5 | 97a5c317ded2fcac8dd1aa18b7ef9dbf |
|
BLAKE2b-256 | 13f50a4e074d2b35bc7f6c4cf489fe92a7b461f999b03cec439b03eaf18ca326 |