It's been a while since I used snmpwalk and snmp in squid - for various
reasons we'd just dropped off using either. Anyhow I recently thought I had
re-enabled snmp in squid and at the same time went out and got the latest
copy of the UCD-SNMP tools, now known as net-snmp.
Everytime I tried this: "snmpwalk -p 3401 squidbox public
.1.3.6.1.4.1.3495.1.1" I got either usage/syntax errors or a timeout error.
Checking the mailing list I saw several others had gotten this as well but
several never got resolved (probably they got resolved but the OP never
followed up). So I figured I'd just let those who might hit the same
time-waster I did that snmpwalk has changed since the old version.
First the obvious/easy to catch stuff (just type snmpwalk -h): snmpwalk no
longer uses the -p argument, instead it is server:port. Second you pass
the community string via the option -c. So the line could look like this:
snmpwalk -c public squidbox:3401 .1.3.6.1.4.1.3495.1.1
However that still gave me the common "snmpwalk: Timeout". Running snmpwalk
with the "-D ALL" debug argument wasn't much more helpful since that just
gave me this:
nmp_sess_open: unable to connect with remote engine: Timeout (-24)
nmp_api: unable to determine remote engine ID
Well this was my own "fault" - wanting to be leading or bleeding edge, I'd
compiled net-snmp with the default of Version 3. So the "Timeout error" was
a misnomer: it was really a "protocol mismatch" type error but manifested
via a timeout. Finally running with "-v 1" I got a response:
snmpwalk -v 1 -c public squidbox:3401 .1.3.6.1.4.1.3495.1.1
SNMPv2-SMI::enterprises.3495.1.1.1.0 = INTEGER: 84
SNMPv2-SMI::enterprises.3495.1.1.2.0 = INTEGER: 8095
SNMPv2-SMI::enterprises.3495.1.1.3.0 = Timeticks: (654267) 1:49:02.67
Lastly since that wasn't much info, to get all the info, I followed another
posters suggestion and copied $SQUIDHOME/share/mib.txt to
/usr/local/share/snmp/mibs (renaming mib.txt to SQUID-MIB.txt) on the box
where I installed net-snmp and then ran this command to see all the
queryable objects:
snmpwalk -v 1 -c m0nitor -m ALL aocproxy2:3401 enterprises.nlanr.squid
(you can replace ALL with whatever you renamed the squid mib.txt file).
Anyhow I am only just restarting with squid, snmp, and mrtg/rrd so I am sure
I will have questions of my own but since I saw several unresolved posts
about the timeout error and in the end, for me, it was just a protocol
mismatch between snmpwalk's default and squid, I thought I'd post about it.
corrections of course welcome :)
Adam
Received on Fri May 02 2003 - 18:34:16 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:16:13 MST