Installasi squidstats untuk monitoring graphic squid proxy server di Ubuntu 10.04 LTS
komentarApa itu squidstats??
- Squidstats adalah sebuah paket yang dapat di install di mesin proxy squid untuk monitoring performansi squid. Parameter yang dapat dilihat antara lain: Number of objects, DNS to IP request/s, ICP Packet/s, Service time (miliseconds), HIT ratio %, IP to DNS request/s, Number of filedescriptors, DNS Service time (miliseconds), Outgoing DNS request/s, CPU Usage, Number of clients, Cache Size, Requests, Incoming bits/second dan Outgoing bits/second.
#install paket pendukung dgn perintah berikut
- apt-get install librrds-perl libsnmp-session-perl snmpd rrdtool apache2 snmp
#install CPAN dengan perintah berikut
- perl -MCPAN -e 'install Config::IniFiles'
#Copy & paste file mib.txt -> /etc/squid/ dan file snmpd.conf -> /etc/snmp/ dan file squidstats.conf -> /etc/apache2/conf.d, dengan perintah berikut
- cd /etc/squid && wget http://andrisuwignyo.net/source/squidstats/mib.txt
- cd /etc/snmp && rm -rf snmpd.conf && wget http://andrisuwignyo.net/source/squidstats/snmpd.conf
- cd /etc/apache2/conf.d && wget http://andrisuwignyo.net/source/squidstats/squid-cachemgr.conf && wget http://andrisuwignyo.net/source/squidstats/squidstats.conf
#untuk squid pastikan ada baris berikut di dalam squid.conf:
snmp_port 3401
acl snmppublic snmp_community public
snmp_access allow snmppublic all
#lalu restart apache, squid, dan snmp dengan perintah berikut
- service apache2 restart
- service snmpd restart
- squid -k shutdown
- squid
#download squidstats dengan perintah berikut dan extract squidstats package
- cd /root && wget http://andrisuwignyo.net/source/squidstats/squidstats-r54.tar.gz && tar xzvf squidstats-r54.tar.gz && cd squidstats-r54
#jalankan perintah berikut ini untuk mengganti file Makefile.default
- rm -rf Makefile.defaults && wget http://andrisuwignyo.net/source/squidstats/Makefile.defaults
#Compile squidstats dan install
- make && make install
#Jalankan createdb dan gather squidstats
- snmpwalk -v 1 -c public localhost
- squidstats.pl createdb
- squidstats.pl gather
#masukkan schedule dengan perintah
- crontab -e
lalu muncul pilihan 2 sebagai default maka enter saja
setelah masuk ke nano untuk crontab, tambahkan baris ini:
*/5 * * * * /usr/local/bin/squidstats.pl gather >/dev/null
#tunggu beberapa saat maka grafik akan muncul
- misal ip server proxy adalah 192.168.10.1 maka untuk alamat yg dibuka adalah
http://192.168.10.1/squidstats/graph-summary.cgi
dr note seorang sahabat
Ripiu.com © 2010 Kreatifroom - Best View with All Major Browser except Internet Explorer


