Questions tagged [pysnmp]

PySNMP is a pure Python module used for SNMP operations.

PySNMP

PySNMP is a pure-Python module that can talk SNMPv1/v2/v3, automatically download and parse MIBs via pysmi and is designed with asynchronous applications in mind (e.g. asyncio).

Its source code spans over multiple GitHub repositories and you can get started from https://github.com/etingof/pysnmp

As the original project owner passed away, future ownership is to be determined. More details can be found in https://github.com/etingof/pysnmp/issues/429

477 questions
2
votes
1 answer

Python SNMP Trap Receiver

I received an SNMP trap message in Python3, and I got a hexadecimal number. How do I convert it to a String so I can see it? Received…
강동인
  • 33
  • 1
  • 1
  • 7
2
votes
1 answer

how to properly access varBinds returned in pysnmp traps

I'm using python 2.7 and trying to capture SNMP traps using pysnmp. I am using the example from http://pysnmp.sourceforge.net/examples/current/v1arch/manager/ntfrcv/v2c-multiple-transports.html. I am having issues with getting the key/values from…
RichP
  • 67
  • 1
  • 3
  • 13
2
votes
1 answer

PYSNMP : TypeError: setComponentByType() got multiple values for keyword argument 'verifyConstraints'

Facing New issue with PYSNMP 4.3.3. Python 2.7.13.With SNMP GET and Getnext: Same is working fine with Pysnmp 4.3.2. The issue actually I am observing when it's involved with virtual env. in the virtual env even if I downgrade Pysnmp from 4.3.3 to…
sbhatta
  • 39
  • 1
  • 13
2
votes
3 answers

Does TRAP and Inform Receiver supported in PYSNMP for SNMP v3?

I can see for Trap reciver for SNMP v1 and V2 here: http://pysnmp.sourceforge.net/examples/v1arch/asyncore/manager/ntfrcv/transport-tweaks.html It does not support SNMP v3 trap. Is there something for v3 trap receiver in PYSNMP? And also is there…
sbhatta
  • 39
  • 1
  • 13
2
votes
1 answer

cisco switch enable port pysnmp

trying to convert this line in to pysnmp snmpset -v 2c -On -r 5 -t 2 -c private ip-address .1.3.6.1.2.1.2.2.1.7.369098771 i 1 I am trying to take a working walk function and modify it but my knowledge with SNMP makes it very hard to understand…
2
votes
5 answers

PySNMP Error: pysnmp.smi.error.SmiError

I am running a Python program on a Windows XP machine. When I run the program, I get the following error: File "C:\Python27\lib\pysnmp\smi\builder.pyt, line 230, in loadModules... pysnmp.smi.error.SmiError: MIB file "SNMPv2-MIB.py[co]" not found in…
Lulu
  • 21
  • 1
  • 1
  • 2
2
votes
1 answer

pysnmp not loading MIB

I have two MIBS files, MIB1 and MIB2, MIB2 is importing elements from MIB1. I've run smilint and build-pysnmp-mib, actually smidump as I was not be able to pre-load the file exporting elements with build-pysnmp-mib. With smidump I have two MIB .py…
jht
  • 141
  • 10
2
votes
1 answer

MIB for PySNMP Agent

I am trying to implement SNMP Monitoring through the use of PySNMP library. Will I be able to query the already existing NET-SNMP MIB on a device? Or do I have to create the MIB on the Agent side with PySNMP?
Camille
  • 183
  • 3
  • 13
2
votes
1 answer

how to get NotificationType() objects from compiled pysnmp mib files?

I have many custom mib files compiled into pysnmp required format and stored under a directory. I am trying to load them and pickup only those who are of type NotificationType(). By default it will include everything How can I accomplish this?…
Brijin
  • 23
  • 4
2
votes
0 answers

Pysnmp - Basic Set example

I am trying to perform a basic set command via a SNMP communication with the library pysnmp, My code is the following: def snmp_set(self, oid, instance, value): errorIndication, errorStatus, errorIndex, varBinds = self.cmdGen.setCmd( …
2
votes
1 answer

Collecting SNMP traps with pySNMP

Which is the more resource-friendly way to collect SNMP traps from a Cisco router via python: I could use a manager on a PC running a server, where the Cisco SNMP traps are sent to in case one occurs I could use an agent to send a GET/GETBULK…
ChillY
  • 106
  • 6
2
votes
3 answers

pysnmp convert .mib to a .py file

When I use: build-pysnmp-mib -o iSCSI_RAID_Rack-1.2.1.py iSCSI_RAID_Rack-1.2.1.mib To convert an .mib file to a .py file it converts it with no errors. When I try to load the file on python I get the following error: ERROR: "NameError: name…
KVL
  • 31
  • 1
  • 5
2
votes
1 answer

Why is async pysnmp so slow?

I need to ask 4000 hosts with simple snmpget query. I used netsnmp with threads and pynetsnmp with twisted and it works pretty fast (less 1 minute). I tried to use pysnmp with AsyncCommandGenerator and pysnmp with twisted (i've fixed that example…
kalombo
  • 861
  • 1
  • 9
  • 31
2
votes
2 answers

Uhandled error in pysnmp twisted client with more than 1000 hosts

I have this code: from twisted.internet import reactor from twisted.internet import defer, task from pysnmp.entity import engine, config from pysnmp.carrier.twisted import dispatch from pysnmp.carrier.twisted.dgram import udp from…
kalombo
  • 861
  • 1
  • 9
  • 31
2
votes
0 answers

I want to Display SNMP output in Django using PYSNMP

I have been given a task to generate SNMP data for printers in a network. I have been able to generate data using snmpwalk in pyscripter. However i wish to know how to implement the same and display on the web using Django. This is similar to NMS…