pySNMP: SNMPget example

Ilya Etingof ilya at cray.glas.net
Wed Jul 16 08:56:40 EDT 2003


> 1) Instead of writing '1.3.6.1.2.1.69.1.3.1', I would also like to be
> able to write 'docsDevSwServer'. Any idea how I can do that?

The right way is to use a MIB parser (for labels-to-oids translation) which
is not a part of pysnmp. Try looking at Python backend to libsmi. If you
expect to query just a small and definite set of OIDs, an alternative would be
to hardcode labels-to-oid mapping somewhere in your script.

-ilya




More information about the Python-list mailing list