etingof / pysnmp

Python SNMP library
http://snmplabs.com/pysnmp/
BSD 2-Clause "Simplified" License
576 stars 195 forks source link

Is it possible to query with pysnmp without the MIB? #348

Open projx opened 4 years ago

projx commented 4 years ago

Hi

SNMP is a dark-art, so this might be a silly question.

Is it possible to query a device without the MIB, If I know the OID? There are several devices I have, that don't have an out-the-box support in pysmp, and I'll admit I don't seem to fully comprehend how to take a mib and compile it, even if I did its fairly impractical, as my deployment method is to create a container that pulls the code direct from the git-repository.

etingof commented 4 years ago

Yes, MIBs are completely optional on the client side (i.e. for SNMP manager). The only nuisance you might encounter when not having a MIB is that response values can sometimes appear as a string of octets rather than a nicely formed MAC address (for example).

If you have a fixed bunch of OIDs, you could probably work that around by adding specific formatting code in place....

projx commented 4 years ago

Great, thank you.