==============================
squid.conf
acl myclass src 10.1.1.0/24
acl snmppublic snmp_community public
snmp_port 3401
snmp_access allow snmppublic myclass
==============================
snmpd.conf
com2sec notConfigUser 10.1.1.0/255.255.255.0 public
com2sec notConfigUser 127.0.0.1 public
view systemview included .1.3.6.1.4.1.3495.1
proxy -v 1 -c public 127.0.0.1:3401 .1.3.6.1.4.1.3495.1
access notConfigGroup "" any noauth exact all none none
view all included .1 80
==============================
重启 snmpd , squid 后
cacti 电脑测试
snmpwalk -Cc -v2c -c public 10.1.1.1:3401 .1.3.6.1.4.1.3495.1
snmpwalk -m /usr/src/squid-3.1.14/src/mib.txt -v2c -Cc -c public 10.1.1.1:3401 .1.3.6.1.4.1.3495.1.1
返回
SQUID-MIB::cacheSysVMsize.0 = INTEGER: 2068
SQUID-MIB::cacheSysStorage.0 = INTEGER: 4607996
SQUID-MIB::cacheUptime.0 = Timeticks: (454128) 1:15:41.28
==============================
获得模板
cacti_graph_template_squid_cache_objects.xml
cacti_graph_template_squid_http_data.xml
cacti_graph_template_squid_http_requests.xml
SquidStats-0.1.zip
cacti_graph_template_squid_-_hit_ratio.xml.zip
cacti_graph_template_squid_-_http_requests.xml.zip
cacti_graph_template_squid_-_http_service_time.xml.zip
cacti_graph_template_squid_-_request_rate.xml.zip
导入模块中切记使用 SNMP V2 port 3401