[mrtg] SNMPWALK Problem for 1.3.6.1.2.1.1 on cross-compiled mrtg (openwrt mipsbe)

Brandon Miller bmiller at radiusgateway.com
Fri Jan 22 17:42:25 CET 2010


Mike Mitchell wrote:
>
> As the author of SNMP_util.pm I strongly disagree that the problem 
> lies with the SNMP_util module.
>
> The SNMP_util.pm module does not do any SNMP queries on its own, 
> rather it calls Simon Leinen's SNMP_Session module to do all socket 
> I/O.  In private email I suggested Brandon Miller use 16-bit SNMP 
> request IDs (--use-16bit on cfgmaker) and to enable 
> 'avoid_negative_request_ids', but he did not respond.
>
>  
>
> Mike Mitchell
>
>  
>
>  
>
>  
>
> *From:* mrtg-bounces at lists.oetiker.ch 
> [mailto:mrtg-bounces at lists.oetiker.ch] *On Behalf Of *Brandon Miller
> *Sent:* Friday, January 22, 2010 10:32 AM
> *To:* Steve Shipway
> *Cc:* mrtg at lists.oetiker.ch
> *Subject:* Re: [mrtg] SNMPWALK Problem for 1.3.6.1.2.1.1 on 
> cross-compiled mrtg (openwrt mipsbe)
>
>  
>
> Steve Shipway wrote:
>
>     I'm attempting to cross-compile mrtg for openwrt on a mipsbe processor.
>
>         
>
> ...
>   
>
>     SNMPv1_Session (remote host: "10.255.255.253" [10.255.255.253].161)
>
>     community: "public"
>
>     request ID: -552632565
>
>     PDU bufsize: 8000 bytes
>
>     timeout: 2s
>
>     retries: 5
>
>     backoff: 1)
>
>     at /usr/share/mrtg/bin/../lib/mrtg2/SNMP_util.pm line 631
>
>     SNMPWALK Problem for 1.3.6.1.2.1.1 on public at 10.255.255.253:::::1:v4only <mailto:public at 10.255.255.253:::::1:v4only>
>
>     at ./cfgmaker line 950
>
>         
>
> ...
>   
>
>     root at OpenWrt:/usr/share/mrtg/lib/mrtg2# snmpwalk -c public -v 1
>
>     10.255.255.253 1.3.6.1.2.1.1
>
>         
>
> ...
>   
>
>     iso.3.6.1.2.1.1.1.0 = STRING: "router"
>
>     iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.14988.1
>
>     iso.3.6.1.2.1.1.3.0 = Timeticks: (46821500) 5 days, 10:03:35.00
>
>     iso.3.6.1.2.1.1.4.0 = STRING: "test-box"
>
>     iso.3.6.1.2.1.1.5.0 = STRING: "wrtName"
>
>     iso.3.6.1.2.1.1.6.0 = STRING: "here"
>
>     iso.3.6.1.2.1.1.7.0 = INTEGER: 78
>
>         
>
>  
> Sounds as if the problem lies in the SNMP_util module, which is part of the MRTG installation.  I have no familiarity with your OS but it may be that this module is making some assumptions about SNMP - maybe there are permissions issues on who can listen the UDP responses, for example.
>  
> Since snmpwalk works we know the issue is not the agent, but snmpwalk uses different code to SNMP_util.pm.
>  
> I'd suggest you direct your investigations to this module, maybe make a small Perl script to use it to make a single SNMP lookup and see if that works?
>  
> Steve
>  
>   
>
> Thanks for the responses.  I took the easy way out and decided to use 
> a different monitoring tool.  Found that rrd was a pre-compiled 
> package for my openwrt install.  Gave that a try and got it working.
>
> Unfortunately, this project is short-fused and I don't have much time 
> to troubleshoot the mrtg install...even though I got this far :)  I 
> agree, the problem was probably in SNMP_util.pm.  I didn't get too far 
> in examining that or the packet dumps that I captured.  I'm also 
> wondering if running the perl code on a big endian machine vs a little 
> endian machine made a difference?
>
> Thanks again
> Brandon
>
>
>
I stand corrected.  I was debugging late at night.  Looking over the 
debugging that I managed to do, it seemed to be stuck in SNMP_Session.pm 
and not in SNMP_util.pm.  Also, while I was just in there looking at it, 
I tried cfgmaker again with the fix Mike suggested.  I changed 
avoid_negative_request_ids as suggested, but didn't seem to help.  
Thanks for the suggestion though.  I have a feeling that SNMP_Session or 
something that it uses is doing something weird with integers that is 
different on a big-endian machine....

Brandon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20100122/bcf2fe14/attachment.htm 


More information about the mrtg mailing list