Monitor Squid dgn MRTG


Artikel diambil dan di translate dari http://www.acmeconsulting.it/SquidNT.html

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

Langsung saja,

squid.conf

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&cacheServerRequests:public@proxy.sg.private:3401
    MaxBytes[proxy-hit]: 100000
    Title[proxy-hit]: HTTP Hits
    PageTop[proxy-hit]: <H2>proxy Cache Statistics: HTTP Hits/Requests</H2>
     <TABLE>
       <TR><TD>System:</TD><TD>proxy.sg.private</TD></TR>
       <TR><TD>Maintainer:</TD><TD>Serassio Guido</TD></TR>
       <TR><TD>Description:</TD><TD>Squid Proxy server</TD></TR>
     </TABLE>
    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&cacheServerOutKb:public@proxy.sg.private:3401
    MaxBytes[proxy-srvkbinout]: 76800
    Title[proxy-srvkbinout]: Cache Server Traffic In/Out
    PageTop[proxy-srvkbinout]: <H2>Cache Statistics: Server traffic volume (In/Out)</H2>
     <TABLE>
       <TR><TD>System:</TD><TD>proxy.sg.private</TD></TR>
       <TR><TD>Maintainer:</TD><TD>Serassio Guido</TD></TR>
       <TR><TD>Description:</TD><TD>Squid Proxy server</TD></TR>
     </TABLE>
    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 proxy.sg.private, 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:

WordPress.com Logo

You are commenting using your WordPress.com 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: