lextudio / pysnmp

Python SNMP library
https://www.pysnmp.com/pysnmp/
BSD 2-Clause "Simplified" License
80 stars 23 forks source link

V3 get command #32

Closed DrewScatterday closed 11 months ago

DrewScatterday commented 11 months ago

Not sure if I'm missing something. I'm on WSL linux with python 3.10 in a conda env

I did the following:

I got some error messages but was able to resolve it by changing to this:

DrewScatterday commented 11 months 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

lextm commented 11 months ago

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.

DrewScatterday commented 11 months ago

Hey @lextm Thank your maintaining this repo and keeping it alive!

A few misunderstandings on my part:

Have a great day

lextm commented 11 months ago

"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.

DrewScatterday commented 11 months ago

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!