This will describe how to get all of the Squid access logs into mysql so you can run whatever reports you want off of them. I don't have time to really write this out nicely right now. But I plan to in the future. So far I just have a basic outline and it'll take a bucket of smarts and common sense to get something to work out of this. I do now have the script up for download which is really the key piece. There's 2-3 other ways of doing this and I plan to mention those as well. Perhaps once I'm done with my IPSEC howto I can get to this. If you have questions I'm generally willing to help, http://sqls.net/contact
Find the log section of you squid file and add/change these lines:
logformat custom %{%Y-%m-%d %H:%M:%S}tl %03tu %>a %>A %<A %la %lp %tr %{Referer}>h %{User-Agent}>h %{Server}<h %un %ul %ui %Hs %mt %rm %ru %rv %<st %Sh %Ss cache_access_log /var/log/squid/access.log custom
You could use any format you want honestly. But this is what I am using.
Yea, sure.. someday I'll export the schema. Meanwhile you'll have to look at the script and build an appropriate DB for it.
Download http://sqls.net/files/squid2mysql.pl and install it to /opt/squid2mysql
Download http://sqls.net/files/squid2mysql and copy it to /etc/init.d
# rc-update add squid2mysql default
/etc/init.d/squid restart
/etc/init.d/squid2mysql start