Reputation: 535
I create some smnp agent which will be use pysnmp to get response with OID. How I can make response OID readable for human with pysnmp?
Example command generator:
cmdGen = cmdgen.CommandGenerator()
errorIndication, errorStatus, errorIndex, varBinds =cmdGen.getCmd(
cmdgen.UsmUserData('user','privKey','authKey'),
cmdgen.UdpTransportTarget(('127.0.0.1', 161)),(1,3,6,1,2,1,1,1,0))
#what I need:
make_human_readble_OID(VarBinds)
Thanks for help!
Upvotes: 0
Views: 237
Reputation: 5555
You should pass the lookupNames and/or lookupValues flags to getCmd() as shown here. Keep in mind that human readability usually requires explicit use of MIBs. To use MIBs with pysnmp you would have to:
Upvotes: 2