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
0
votes
1 answer

pysnmp: how to make an oid writable

I would like to emulate a SNMP device, who i don't have the MIB file from device. I just need to emulate one function, a writable OctectString value. Here is my code: from pysnmp.carrier.asynsock.dispatch import AsynsockDispatcher from…
skrew
  • 879
  • 9
  • 16
0
votes
1 answer

pysnmp.smi.error.SmiError: No module X-MIB loaded at

I am trying to do a GET command on a few specific OIDs for my application. I have a custom MIB file in .txt format. I converted the file to .py format via http://www.ibr.cs.tu-bs.de/projects/libsmi/tools/ I get this error. I save the output as…
asumal
  • 7
  • 4
0
votes
1 answer

What is 'my-creds', 'my-area', and 'my-router' in these Python PySNMP codes?

I am new in using PySNMP module in Python. According to this user manual and this manual, the following python scripts perform similar things like the net-snmp command: net-snmp v1 command: snmpget -v1 -c public -ObentU 195.218.195.228…
userpal
  • 1,483
  • 2
  • 22
  • 38
0
votes
0 answers

How an SNMP master Python script can load an SNMP get respose into python data structure?

Using pysnmp or any other library, is it possible to take the response from a SNMP get/getbulk request and automatically populate a Python data structure (class, etc) based on the MIB? Cheers, Donal
Donal M
  • 1,305
  • 2
  • 11
  • 23
0
votes
0 answers

PySNMP exceptions

I am trying to make an SNMP agent following this tutorial: http://www.nealc.com/blog/blog/2013/02/23/writing-an-snmp-agent-with-a-custom-mib-using-pysnmp/ I am using the exact code in the tutorial, but when I run the code it ends in this: DBG:…
Dakkaron
  • 5,930
  • 2
  • 36
  • 51
0
votes
2 answers

No module named compat.octets

I am trying to use the below code to perform simple SNMP operation. Please help me figure out the error. from pysnmp.entity.rfc3413.oneliner import cmdgen cmdGen = cmdgen.CommandGenerator() errorIndication, errorStatus, errorIndex,…
user3732361
  • 377
  • 8
  • 13
0
votes
1 answer

using custom MIB's with pysnmp

I am new to python programming and am currently embarking on a project to learn more about SNMP and MIB's. I am programming using Eclipse and pyDev with the pysnmp framework. Anyone who has used this before will know that the documentation is not…
user3689491
  • 27
  • 1
  • 5
0
votes
2 answers

python multiprocessing execute code in child process when termination occurs

I want to know if there's a way to run some code on the child process when the parent process tries to terminate the child process. Is there a way we can write an Exception maybe? My code looks something like this: main_process.py import Process…
user2511458
  • 75
  • 3
  • 10
0
votes
1 answer

PYSNMP stop and restart a trap reciever

I am trying to create a pysnmp daemon. I want to have the ability to start, stop, and restart the thread that the daemon is running on. I am having trouble cleaning the socket, notification receiver, and transport dispatcher. I am using a pysnmp…
KVL
  • 31
  • 1
  • 5
0
votes
3 answers

Can't get pysnmp to work with pyinstaller

Attempting to get pyinstaller to work with pysnmp Here is the spec file # -*- mode: python -*- a = Analysis(['app.py'], pathex=['/home/robertja/pysnmp'], hiddenimports=None, hookspath=None, …
Robert Jacobs
  • 3,266
  • 1
  • 20
  • 30
0
votes
1 answer

cmdGen.nextCmd out of sync

I am trying to retrieve some columns in an snmp table. Depending on the permissions of the agent, sometimes columns are not returned. When that happens, the OID of the next valid response is duplicated in the varBindTable. Is there any marker or…
Robert Jacobs
  • 3,266
  • 1
  • 20
  • 30
0
votes
1 answer

pysnmp poll specific process index within HOST-RESOURCES-MIB

I have the following code which I've been using to poll with pysnmp. Up until now it has been used to walk but I'd like to be able to get a specific index. For example I'd like to poll HOST-RESOURCES-MIB::hrSWRunPerfMem.999 I can use this to…
EEP
  • 715
  • 1
  • 4
  • 17
0
votes
1 answer

How can I get pysnmp to use pysnmp-mib for friendly output?

I'm new to both pysnmp and snmp, and I'm trying to get a simple script to dump stats from two routers on my network (an Airport Extreme, and Tomato Firmware router). This code is (from online examples) works, but without friendly names: from…
DonGar
  • 7,344
  • 8
  • 29
  • 32
0
votes
1 answer

Eclipse / PyDev falsely identifies package as missing

I am experiencing a very strange issue using Eclipse and PyDev (latest versions as of this post). This is with Python 3.3.2. I installed the egg for PySNMP which was successful, however in PyDev, my program errors out with this import…
user1243151
  • 65
  • 1
  • 5
0
votes
1 answer

PySNMP Builder fails loading CISCO-RTTMON-MIB

I keep getting this error in the PySNMP builder when trying to load CISCO-RTTMON-MIB. The code below works with all other mibs I've tried so far, but this one is getting stuck. This is also the first time I'm trying to walk an entire table…
Bryan F.
  • 23
  • 7