Skip to content

x86Labs/mysar-ng

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mysar-ng
====

MySQL Squid Access Report (new generation) —→ Clone off http://sourceforge.net/projects/mysar/

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/

About

MySQL Squid Access Report (new generation) ---> Clone off http://sourceforge.net/projects/mysar/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 45.0%
  • Smarty 29.1%
  • C 11.9%
  • Shell 8.6%
  • Makefile 5.3%
  • CSS 0.1%