Skip to content
MySQL Squid Access Report (new generation) ---> Clone off http://sourceforge.net/projects/mysar/
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
mysar
LICENSE
README.textile
mysar.sql

README.textile

mysar-ng
====

MySQL Squid Access Report (new generation)

MYSAR-ng Handbook

Requirements:

Apache or Nginx
Mysql 5.6 or highter
GCC

Installation:

1- Install on APACHE:

1.1- Clone repository:

cd /opt ; git clone https://github.com/coffnix/mysar-ng.git
mv /opt/mysar-ng/mysar /srv/www/htdocs/

1.2- Copy file to apache conf dir:

cp /srv/www/htdocs/mysar/etc/mysar.apache /etc/apache2/vhosts.d/mysar.conf

or configure manually:

Alias /mysar /srv/www/htdocs/mysar/www
<Directory "/srv/www/htdocs/mysar/www">
        Options Indexes MultiViews
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>

1.3- Restart apache:

/etc/init.d/apache2 restart

2- Install on MYSQL:

2.1- Create user and database:

mysql> create database mysar;
mysql> grant all privileges on mysar.* to mysar@'localhost' identified by 'mysar123';
mysql> flush privileges;

2.2- Import default database:
mysql mysar < /opt/mysar-ng/mysar.sql 

3- Compile Binary importer
/!\ Binary wasn’t upgraded,it probably does’nt work anymore, I will upgrade it soon /!\

cd /srv/www/htdocs/mysar/bin/mysar-binary-importer/ ; make clean && make && make install

4- Configure your crontab

* * * * *      root    /usr/bin/mysar > /srv/www/htdocs/mysar/log/mysar-importer.log 2>&1
01 00 * * * root /srv/www/htdocs/mysar/bin/mysar-rotate-diario.sh

Best practices

turn off logs cache_object on SQUID:

acl manager proto cache_object
acl localhost src 127.0.0.1/32

log_access deny manager
http_access allow manager localhost

For more infos, please RTFM :D

Squid old: http://www.squid-cache.org/Doc/config/log_access/

Squid new: http://www.squid-cache.org/Doc/config/access_log/

You can’t perform that action at this time.