Monitor Squid dgn MRTG

Artikel diambil dan di translate dari

Disini yang diperlukan hanya mengkonfigurasi squid agar mendukung SNMP. Untuk lebih jelasnya mengenai MRTG silahkan klik

Langsung saja,


acl snmppublic snmp_community public
snmp_port 3401
snmp_access allow snmppublic all

(Here you can use any community name and any valid acl name)mrtg.cfg

  • Copy the mib.txt file from Squid in the mibs directory of your MRTG installation
  • Add to Global Config Options of your mrtg.conf a line like the followig:
    LoadMIBS: /usr/local/mrtg-2/mibs/squid.mib

    (Here I have renamed mib.txt in squid.mib)

  • Add targets like the following:
    Target[proxy-hit]: cacheHttpHits&
    MaxBytes[proxy-hit]: 100000
    Title[proxy-hit]: HTTP Hits
    PageTop[proxy-hit]: <H2>proxy Cache Statistics: HTTP Hits/Requests</H2>
       <TR><TD>Maintainer:</TD><TD>Serassio Guido</TD></TR>
       <TR><TD>Description:</TD><TD>Squid Proxy server</TD></TR>
    Suppress[proxy-hit]: y
    LegendI[proxy-hit]:  HTTP hits
    LegendO[proxy-hit]:  HTTP requests
    Legend1[proxy-hit]:  HTTP hits
    Legend2[proxy-hit]:  HTTP requests
    YLegend[proxy-hit]: perminute
    ShortLegend[proxy-hit]: req/min
    Options[proxy-hit]: nopercent, perminute, dorelpercent, unknaszero
    Target[proxy-srvkbinout]: cacheServerInKb&
    MaxBytes[proxy-srvkbinout]: 76800
    Title[proxy-srvkbinout]: Cache Server Traffic In/Out
    PageTop[proxy-srvkbinout]: <H2>Cache Statistics: Server traffic volume (In/Out)</H2>
       <TR><TD>Maintainer:</TD><TD>Serassio Guido</TD></TR>
       <TR><TD>Description:</TD><TD>Squid Proxy server</TD></TR>
    Suppress[proxy-srvkbinout]: y
    LegendI[proxy-srvkbinout]:  Traffic In
    LegendO[proxy-srvkbinout]:  Traffic Out
    Legend1[proxy-srvkbinout]:  Traffic In
    Legend2[proxy-srvkbinout]:  Traffic Out
    YLegend[proxy-srvkbinout]: per minute
    ShortLegend[proxy-srvkbinout]: b/min
    kMG[proxy-srvkbinout]: k,M,G,T
    kilo[proxy-srvkbinout]: 1024
    Options[proxy-srvkbinout]: nopercent, perminute, unknaszero

Nama hostname proxy adalah, dengan  public SNMP community enabled dan SNMP listen di port 3401

Please note the MaxBytes value (76800 KB/min) for Cache Server Traffic In/Out: it depends from your Proxy network interface speed.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: