Skip to main content

Python NET-SNMP Bindings

Project description

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 (load averages): ::
>>> 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: ::
>>> 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"')]

Project details


Download files

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

Source Distribution

netsnmp-py-0.1.tar.gz (63.7 kB view details)

Uploaded Source

File details

Details for the file netsnmp-py-0.1.tar.gz.

File metadata

  • Download URL: netsnmp-py-0.1.tar.gz
  • Upload date:
  • Size: 63.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for netsnmp-py-0.1.tar.gz
Algorithm Hash digest
SHA256 d83233a683a5ec2f676b6f3bc2b90c0dc9e97603d61dc5823b2140fa10fea027
MD5 22e0c6b7b299407310bfd20cf9771d4a
BLAKE2b-256 c846778824be4c88631bbbc06001240813230954cf86e5d6c901e6260ce1e3cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page