This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python NET-SNMP Bindings

Project Description

Installation

Debian 7+ Python 2.7

# apt-get install libsnmp30 libsnmp30-dev python-zmq libczmq3 libczmq-dev
# pip install netsnmp-py

Debian 7+ Python 3

# apt-get install libsnmp30 libsnmp30-dev libczmq3 libczmq-dev
# pip3 install pyzmq
# pip3 install netsnmp-py

Basic usage

SNMP GET

>>> with netsnmp.SNMPSession('archt01', 'public') as ss:
...     ss.get(['.1.3.6.1.2.1.1.1.0', '.1.3.6.1.2.1.1.3.0', '.1.3.6.1.2.1.1.5.0'])
...
[('.1.3.6.1.2.1.1.1.0', 'STRING', '"Linux archt01 ... 2015 x86_64"'), ('.1.3.6.1.2.1.1.3.0', 'Timeticks', '1:11:36:30.56'), ('.1.3.6.1.2.1.1.5.0', 'STRING', '"archt01"')]

SNMP GETNEXT

>>> with netsnmp.SNMPSession('archt01', 'public') as ss:
...     ss.getnext(['.1.3.6.1.2.1.1.1', '.1.3.6.1.2.1.1.2.0', '.1.3.6.1.2.1.1.4.0'])
...
[('.1.3.6.1.2.1.1.1.0', 'STRING', '"Linux archt01 ... 2015 x86_64"'), ('.1.3.6.1.2.1.1.3.0', 'Timeticks', '1:11:39:35.05'), ('.1.3.6.1.2.1.1.5.0', 'STRING', '"archt01"')]

SNMP WALK (generator)

>>> with netsnmp.SNMPSession('archt01', 'public') as ss:
...     [response for response in ss.walk(['.1.3.6.1.4.1.2021.10.1.3'])]
...
[('.1.3.6.1.4.1.2021.10.1.3.1', 'STRING', '"0.37"'), ('.1.3.6.1.4.1.2021.10.1.3.2', 'STRING', '"0.25"'), ('.1.3.6.1.4.1.2021.10.1.3.3', 'STRING', '"0.29"')]

IPv6 support, if included in NET-SNMP

>>> with netsnmp.SNMPSession('udp6:[fe80::c67:bb2b:dbb4:8c63]', 'public') as ss:
...     ss.get(['.1.3.6.1.2.1.1.1.0'])
...
[('.1.3.6.1.2.1.1.1.0', 'STRING', '"Linux archt01 4.3.0-1-ck #1 SMP PREEMPT Sun Nov 15 13:24:29 EST 2015 x86_64"')]
Release History

Release History

This version
History Node

0.4

History Node

0.3

History Node

0.2

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
netsnmp-py-0.4.tar.gz (24.3 kB) Copy SHA256 Checksum SHA256 Source Apr 28, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting