Re: [pysnmp-users] SNMP not getting a value
Brought to you by:
elie
From: Ilya E. <il...@gl...> - 2008-07-11 18:52:59
|
A non-empty "errorIndication" means request failure, in your case - requestTimeout, what leads to empty result. SNMP protocol supports 32-bit width integers so 2^32 values will pass through. >From your description it looks like your SNMP Agent is sometimes slow responding to your requests. You may want to try increasing timeout value in your SNMP Manager script: UdpTransportTarget( transportAddr, timeout, retries ) -ilya [ skipped ] > The code to get a value is: > -------- > newmibs=tuple(newmibs) > errorIndication, errorStatus, errorIndex, varBinds = > apply(cmdgen.CommandGenerator().getCmd,(cmdgen.CommunityData('my-agent',PASSWD,0),cmdgen.UdpTransportTarget((IP, PORT))) + newmibs) > print varBinds > print errorIndication,errorStatus,errorIndex > -------- > > If it's working I get: > -------- > [(ObjectName('1.3.6.1.2.1.2.2.1.4.1'), Integer32('1500'))] > None 0 0 > -------- > > If it's not working: > -------- > () > requestTimedOut 0 0 > -------- |