Previous Next Table of Contents

18. SNMP

This section could use more input from others who are familiar with SNMP. Please write us if you can contribute!

18.1 Does Squid support SNMP?

Version 1.2 does, earlier versions do not.

You can use Matija Grabnar's mrtg-for-squid package to monitor Squid-1.1 and earlier versions with MRTG.

18.2 Is there a standard SNMP MIB for Web Caches?

No, not at the moment. We have a Cache SNMP mailing list intended to foster discussion on this subject.

18.3 How do I configure SNMP?

First, you must enable compiling of the SNMP code with the configure script:

        ./configure --enable-snmp  [ ... other configure options ]
Next, recompile the sources entirely:
        make clean
        make all
        make install
Next, configure SNMP in the squid.conf file. You MUST add the snmp_agent_conf lines as there is no default for those:
        snmp_port 3401
        snmp_mib_path /local/squid/etc/mib.txt

        snmp_agent_conf view all .1.3.6 included
        snmp_agent_conf view squid .1.3.6 included
        snmp_agent_conf user squid - all all public
        snmp_agent_conf user all all all all  squid
        snmp_agent_conf community public squid squid
        snmp_agent_conf community readwrite all all

18.4 How can I use SNMP with Squid?

MRTG

We use MRTG with this patch. Here is a sample of our MRTG configuration:

        Target[httpsvc]: cacheHttpAllSvcTimeFiveMin&cacheHttpAllSvcTimeFiveMin:public@squid.nlanr.net
        Title[httpsvc]: HTTP svc
        PageTop[httpsvc]: <H1>Cache Statistics: HTTP Median Service Time (5 min)<H1>
        Suppress[httpsvc]: y
        LegendI[httpsvc]:  HTTP 5min svc
        LegendO[httpsvc]:  
        Legend1[httpsvc]:  HTTP 5 min cache Median Service Time
        Legend2[httpsvc]:  
        YLegend[httpsvc]: msec
        ShortLegend[httpsvc]: ms
        Options[httpsvc]: nopercent, gauge

To see how cool it looks, check out the SNMP graphs for the NLANR caches.

scotty/tkined

We have also had good luck with scotty.


Previous Next Table of Contents