[squid-users] Trouble getting SNMP to work in Squid 5
Amos Jeffries
squid3 at treenet.co.nz
Thu Dec 21 05:13:39 UTC 2017
On 21/12/17 15:53, Chris Horry wrote:
> Hello all,
>
> I'm using the following configuration for SNMP:
>
> acl horry src 192.168.0.0/16 <http://192.168.0.0/16>
> ...
> snmp_port 3401
> acl snmppublic snmp_community <snip>
> snmp_access allow snmppublic horry localhost
NP: src-IP address cannot simultaneously be 127.0.0.1 and a 192.168.*.*
IP. So requests will be denied, but that is not your current problem.
> snmp_incoming_address 0.0.0.0
> snmp_outgoing_address 0.0.0.0
>
>
>
> Squid is compiled with the --enable-snmp option.
>
> $ squid --version
> Squid Cache: Version 5.0.0-20171215-rb7c260f
> Service Name: squid
> configure options: '--enable-ssl' '--enable-linux-netfilter'
> '--enable-htcp' '--enable-snmp' '--enable-storeio=ufs,diskd,aufs'
> '--enable-async-io' '--with-aio' '--with-large-files'
> '--enable-removal-policies=heap'
>
> However, when I try to query SNMP:
>
> $ snmpwalk -m ../share/mib.txt -v2c -Cc -c <snip> localhost:3401
You will need to use 127.0.0.1 explicitly or the localhost-ip4 name if
you hosts file defines one. "localhost:3401" also resolves to [::1]:3401
which you have closed.
> MIB search path:
> /home/zerbey/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
> Cannot find module (SNMPv2-SMI): At line 8 in ../share/mib.txt
> Cannot find module (SNMPv2-TC): At line 11 in ../share/mib.txt
> Cannot find module (INET-ADDRESS-MIB): At line 14 in ../share/mib.txt
> Did not find 'enterprises' in module #-1 (../share/mib.txt)
> Did not find 'DisplayString' in module #-1 (../share/mib.txt)
> Did not find 'InetAddressType' in module #-1 (../share/mib.txt)
> Did not find 'InetAddress' in module #-1 (../share/mib.txt)
> Unlinked OID in SQUID-MIB: nlanr ::= { enterprises 3495 }
> Undefined identifier: enterprises near line 50 of ../share/mib.txt
> Cannot adopt OID in SQUID-MIB: cacheCurrentFileDescrMax ::= {
> cacheSysPerf 13 }
> ...this continues for many lines, but the gist is it doesn't get any
> data... ending on...
> Cannot adopt OID in SQUID-MIB: cacheIpCache ::= { cacheNetwork 1 }
>
Are you sure your system snmp is installed correctly? That looks like
the basic system MIB files are missing or unreadable.
>
> Tried various iterations of snmpwalk including from other hosts and with
> udp/tcp. Never get any response.
>
> Not sure where to go from here, is there any other debugging I can
> enable or is SNMP configured differently in v5?
It's the same in all v3+.
Amos
More information about the squid-users
mailing list