====== Squid ======
Enable SNMP-Support for Squid
snmp_port 3401
acl snmppublic snmp_community public
acl logger src x.x.x.x
snmp_access allow snmppublic logger
snmp_access deny all
where x.x.x.x is the IP for the host where you will query from.
Restart Squid and test with
snmpwalk -v1 -c public squid-host:3401 .1.3.6.1.4.1.3495.1
and you will see some internal Squid information like this
SNMPv2-SMI::enterprises.3495.1.1.1.0 = INTEGER: 16360
SNMPv2-SMI::enterprises.3495.1.1.2.0 = INTEGER: 21626872
...
If you have already installed snmpd, you can use the proxy facility, which allows to redirect SNMP queries. First you have to setup Squid to allow queries from localhost:
snmp_port 3401
acl snmppublic snmp_community public
snmp_access allow snmppublic localhost
snmp_access deny all
Again, restart Squid and append to ''/etc/snmp/snmpd.conf'':
proxy -v 1 -c public localhost:3401 .1.3.6.1.4.1.3495.1
and test it from any remote host:
snmpwalk -v1 -c public squid-host .1.3.6.1.4.1.3495.1
Again you should see the snmp walk. Notice, no port information is needed any more, the query is redirected from snmpd to squid.
Too easy...
--- //[[jt@fd0.org|Jens Thomas]] 24.05.2007 23:31//