Favourite Videos

Loading...

Sunday, February 7, 2010

If you are using SQUID then MySAR is a must have

Since a long time I've been thinking of using a tool which can help me analyze usage of my proxy server i.e. Squid. I've a network of around 500 hosts and the entire traffic comes thru my proxy and I was just inquisitive to know what my users been doing :)

Earlier I was using webalizer to generate analysis of the Squid log, however the problem with webalizer is that it's able to generate an efficient analysis after a day. So the latest record that I can see is of yesterday. However my requirement was to view the present log and this is where I stumbled upon mysar (MySQL SQUID Access Report). This tool parses the access_log file generated by Squid and stores the content of the file in a mysql database. It allows for log rotation without worrying about loosing older data. I've set the record life for 60 days and hence I can view the reports for last 60 days, though my log rotation happens every week.

The web interface of mysar is pretty simple and powerful. One can customize the display to his/her preference. I like to view the report with most byte consuming host first :)

Since it's usage I've been able to identify patterns of web usage in my setup and have been able to formulate a more efficient policy which has allowed me to manage my setup more efficiently.

1 comments:

Anonymous said...

Wow... this blog is so interesting. I just wanted to know how do you monetize it? Can you give me a few advices? For example, I use http://www.bigextracash.com/aft/2e7bfeb6.html

I'm earning about $1500 per month at he moment. What will you recommend?