Few days ago i written a post configuring SqStat on CentOS box so that you can monitor live traffic of squid, users and the websites they are accessing. It worked fine for all versions of squid till 3.3.2 because when i was trying to monitor the traffic it throws me an error saying "Error (1): Cannot get data. Server answered: HTTP/1.1 200 OK"
wonder is usually it gives HTTP FORBIDDEN error if web server is not allowed to cache in squid.conf, but this say's HTTP OK, After a little search on it i found SqStat need a patch to make it work with squid version 3.2 on wards .. lets see how to do it.
Patching in the sense you don't need to involve running any scripts all you need to do is you just replace around 5 or 6 old lines from sqstat.class.php with new lines. For your ease i shared modified sqstat.class.php simply go to sqstat director on your apache, rename existing sqstat.class.php as sqstat.class.php.bak and download my file finally restart the apache.
Download sqstat.class.php
Note : Back up your original file before editing configuration.
[root@apache]# cd /var/www/sqstat
[root@apache]# mv sqstat.class.php sqstat.class.php.bak
[root@apache]#wget https://www.dropbox.com/s/0u88zbc2a3qxzoo/sqstat.class.php.tar
[root@apache]# tar -xvf https://www.dropbox.com/s/0u88zbc2a3qxzoo/sqstat.class.php.tar
[root@apache]# /etc/init.d/httpd restart
Now check it , some times i found it's working but now showing by ip address. I'll check it and post in soon. http://fileml.com/file/0r55661[root@apache]# mv sqstat.class.php sqstat.class.php.bak
[root@apache]#wget https://www.dropbox.com/s/0u88zbc2a3qxzoo/sqstat.class.php.tar
[root@apache]# tar -xvf https://www.dropbox.com/s/0u88zbc2a3qxzoo/sqstat.class.php.tar
[root@apache]# /etc/init.d/httpd restart
3 Comments
hi..many thanks for your post! I have tried everything and sqstat start working on squid 3.2.7 but it does not show the clinet ip address its only show 0.0.0.0 and all the websites listed down in open session
ReplyDeleteplease helpe me how to resolve this issue,
no ip is shown on page
for your reference attached is the picture which displays at my browser
ReplyDeletehttp://www.freeimagehosting.net/newuploads/idy5s.jpg
Excelente, Thank you
ReplyDelete