Monitoring Proxy Server Secara Realtime dengan sqstat

memonitor proxy server sangat di buthkan terutama untuk admin jaringan yang membutuhkan realtime monitoring squid mereka disini kita akan coba gunakan sqstat untuk monitoringnya.

disini penulis mencoba membuat dengan spesifikasi sebagai berikut:

1. gateway pc router dengan os fedora core 7(masih jadul karna lom update2 tapi kernel sih udah :D) + squid proxy versi 2.6

2. pc linux ubuntu disini sebenernya saya buat mainan vps dengan openvz dan saya coba di HN(hostnode)

——————————————————————————–

]0;root@vps.ardantus.net: ~root@vps:~# cd /var/www/
]0;root@vps.ardantus.net: /var/wwwroot@vps:/var/www# ls
config      functions  log        logout.php  readlog.php  stats
entut.html  index.php  login.php  mrtg        readme.txt
]0;root@vps.ardantus.net: /var/wwwroot@vps:/var/www# sqstatsmsqstatsksqstatsdsqstatsisqstatsrsqstats sqstats
]0;root@vps.ardantus.net: /var/wwwroot@vps:/var/www# cd sqstat
]0;root@vps.ardantus.net: /var/www/sqstatroot@vps:/var/www/sqstat# ls
]0;root@vps.ardantus.net: /var/www/sqstatroot@vps:/var/www/sqstat# wget http://samm.kiev.ua/sqstat/sqstat-1.20.tar.gz
–19:23:04–  http://samm.kiev.ua/sqstat/sqstat-1.20.tar.gz
=> `sqstat-1.20.tar.gz’
Resolving samm.kiev.ua… 77.120.97.61
Connecting to samm.kiev.ua|77.120.97.61|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 10,715 (10K) [application/x-gzip]

0% [                                     ] 0             –.–K/s
35% [============>                        ] 3,816         13.50K/s
87% [===============================>     ] 9,416         16.30K/s
100%[====================================>] 10,715        18.34K/s

19:23:06 (18.31 KB/s) – `sqstat-1.20.tar.gz’ saved [10715/10715]

]0;root@vps.ardantus.net: /var/www/sqstatroot@vps:/var/www/sqstat# tar -zxvf sqstat-1.20.tar.gz
sqstat-1.20
sqstat-1.20/docs
sqstat-1.20/config.inc.php.defaults
sqstat-1.20/sqstat.class.php
sqstat-1.20/sqstat.php
sqstat-1.20/sqstat.css
sqstat-1.20/zhabascript.js
sqstat-1.20/arrow.gif
sqstat-1.20/docs/FAQ
sqstat-1.20/docs/TODO
sqstat-1.20/docs/README
sqstat-1.20/docs/LICENSE
sqstat-1.20/docs/CHANGES
]0;root@vps.ardantus.net: /var/www/sqstatroot@vps:/var/www/sqstat# cd sqstat-1.20
]0;root@vps.ardantus.net: /var/www/sqstat/sqstat-1.20root@vps:/var/www/sqstat/sqstat-1.20# ls
arrow.gif                docs              sqstat.css  zhabascript.js
config.inc.php.defaults  sqstat.class.php  sqstat.php
]0;root@vps.ardantus.net: /var/www/sqstat/sqstat-1.20root@vps:/var/www/sqstat/sqstat-1.20# c- p -r * [1@m[1@v/var/www/sqstat/
mv: invalid option — r
Try `mv –help’ for more information.
]0;root@vps.ardantus.net: /var/www/sqstat/sqstat-1.20root@vps:/var/www/sqstat/sqstat-1.20# mv -r * /var/www/sqstat/
]0;root@vps.ardantus.net: /var/www/sqstat/sqstat-1.20root@vps:/var/www/sqstat/sqstat-1.20# ;ls
]0;root@vps.ardantus.net: /var/www/sqstat/sqstat-1.20root@vps:/var/www/sqstat/sqstat-1.20# cd .
]0;root@vps.ardantus.net: /var/www/sqstat/sqstat-1.20root@vps:/var/www/sqstat/sqstat-1.20# cd ..
]0;root@vps.ardantus.net: /var/www/sqstatroot@vps:/var/www/sqstat# rm -rf sqstat-1.20
]0;root@vps.ardantus.net: /var/www/sqstatroot@vps:/var/www/sqstat#

——————————————————————-

configurasi dari file config.inc.php nya

—————————————————————

<?php
/* global settings */

$use_js=true; // use javascript for the HTML toolkits

// Maximum URL length to display in URI table column
DEFINE(“SQSTAT_SHOWLEN”,100);

/* proxy settings */

/* Squid proxy server ip address or host name */
$squidhost[0]=”192.168.0.1″;
/* Squid proxy server port */
$squidport[0]=3128;
/* cachemgr_passwd in squid.conf. Leave blank to disable authorisation */
$cachemgr_passwd[0]=””;
/* Resolve user IP addresses or print them as numbers only [true|false] */
$resolveip[0]=false;
/* uncomment next line if you want to use hosts-like file.
See hosts.txt.dist. */
/* $hosts_file[0]=”hosts.txt”
/* Group users by hostname – “host” or by User – “username”. Username work only
with squid 2.6+ */
$group_by[0]=”host”;

/* you can specify more than one proxy in the configuration file, e.g.: */
// $squidhost[1]=”192.168.0.2″;
// $squidport[1]=3129;
// $cachemgr_passwd[1]=”secret”;
// $resolveip[1]=true;
// $hosts_file[1]=”otherhosts.txt”

?>

———————————————————————————

konfigurasi di squid.conf nya di tambahi

acl manager proto cache_object
acl webserver src 192.68.0.0/255.255.255.0 ##Sesuaikan dengan ip webserver anda
http_access allow manager webserver
http_access deny manager

—————————————————-

berikut skrinsutnya gan.

ini logs putty nya:

http://azepted.comxa.com/index.php?show=4

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