Closed DrewScatterday closed 1 year ago
One tiny other thing I noticed was I couldn't get USM to work with just strings. For example:
user = UsmUserData('usr-md5-des', 'authkey1', 'privkey1')
I got an error message:
pysnmp.error.PySnmpError: Unsupported authentication object
But changing to this seemed to solve for me
user = UsmUserData(userName='usr-md5-des', authKey='authkey1', privKey='privkey1')
Maybe this thread will help someone from Google
Please go through the documentation on https://pysnmp.com and the examples folder in this repo if you want to learn more about this project.
Hey @lextm Thank your maintaining this repo and keeping it alive!
A few misunderstandings on my part:
UsmUserData('usr-md5-des', 'authkey1', 'privkey1')
snmpget.py -v3 -l authPriv -u usr-md5-des -A authkey1 -X privkey1 demo.pysnmp.com sysDescr.0
My linux system is not able to find snmpget.py. So not sure what I messed up there but the CLI is not applicable to my use caseHave a great day
"https://pysnmp.readthedocs.io" has been a pain for long, but whoever set it up isn't responsive to any inquiry to shut it down. It takes time for "https://pysnmp.com" to grow higher in search engine results and replace that obsolete site one day.
I just updated https://www.pysnmp.com/snmpclitools/ to reflect latest changes. You no longer need to add .py
to execute the commands, but simply snmpget
. However, this will conflict to Net-SNMP if you happen to install that on the same machine. You will need to hack system path to make sure the PySNMP command line tools are resolved before Net-SNMP executable.
Yeah I've been mislead by that out of date site/repo a few times
The demo.snmp agent url that "https://pysnmp.readthedocs.io/" references is no longer active so I started really getting confused when trying to poll with snmp get messages and nothing was working. So thanks for running and maintaining demo.pysnmp.com because it makes testing snippets really easy!
Not sure if I'm missing something. I'm on WSL linux with python 3.10 in a conda env
I did the following:
pip install pysnmp-lextudio
pip install snmpclitools-lextudio
snmpget.py -v3 -l authPriv -u usr-md5-des -A authkey1 -X privkey1 demo.pysnmp.com sysDescr.0
I got some error messages but was able to resolve it by changing to this:
snmpget -v 3 -l authPriv -u usr-md5-des -A authkey1 -X privkey1 demo.pysnmp.com sysDescr.0