SNMP, MRTG and Squid

less than 1 minute read

Meethune got me on a MRTG kick this past week, which lead me on a SNMP frenzy.

The setup was pretty easy (read: the docs for both MRTG and SNMP are excellent), so I was able to get the NIC monitoring on my router up in virtually no time. The Squid docs are god-awful however, so here’s my mini-mini-how-to on a Gentoo box:

Versions: MRTG: 2.11.0 Squid: 2.5.7 Net-SNMP: 5.1.1

Enable snmp support in /etc/squid/squid.conf:

acl snmpYourCommunityName snmp_community YourCommunityName
snmp_port 3401
snmp_access allow snmpYourCommunityName localhost
snmp_access deny all

Add this mib file to your /usr/share/snmp/mibs/ and add

mibs +SQUID-MIB

to /etc/snmp/snmp.conf. This will let you see the symbolic names instead of those !*($&! numbers.

Now, you will need this mrtg config file to generate those sexy mrtg pages. You will need to replace all the “COMMUNITY” entries in this with your Squid community and modify the doc root, but it should work otherwise.

More info: Net-SNMP FAQ ViSolve.com - Squid MRTG Squid page

Categories:

Updated:

Leave a Comment