i want it to be stored in database like
Receivedat: 2013-09-27 17:11:07
Client IP: 172.16.0.xxx
Url: http://google.co.in
status: MISS
Provider: web-proxy
Looks like you never got a reply to this.
I am wondering about whether to do the same thing,
…or attempt to write a script to clean things up before leaving the Mikrotik router.. e.g. just keeping the Response to "GET http:’ and ‘Content-Length:’ lines and then send those via a HTTP GET?
Mark
For what its worth, the webproxylogtomysql.php in Proxylizer does a pretty good job of recording URL requests, domains and HIT/MISS requests in Mysql via syslog-ng. It comes with a small crontab wrapper script that keeps it running. It takes the output of a named pipe fed by syslog-ng and pushes everything into Mysql.
The rest of Proxylizer (report generation, mailing etc) is a little broken now, especially if your running PHP5, as theirs a lot of deprecated stuff in there now. (e.g ereg and use of DB.php)
Want to share my script, wich convert rsyslog mkaccess.log file to squid format. mkaccess.log: no debug, only simple one-record-per-line format.
There is no size(fake size, 1024 per string), no dst-host ip(fake ip 8.8.8.8), only datetime, local ip and url persist
Output can be used on linux-tools like lightsquid etc.
I wrote simple one-line script based on script posted near year ago. Script worked like a charm(i think) and faster than perl-script. 8 min vs more than 10 hours. I hope this line help some one.