Ubuntu 14.04
Sponsored Link

Squid Log Report : SARG
2014/06/08
 
Install SARG (Squid Analysis Report Generator) to generate Squid Log Report.
[1] Install and Configure SARG.
root@prox:~#
apt-get -y install sarg
root@prox:~#
vi /etc/sarg/sarg.conf
# line 7: change

access_log /var/log/
squid3
/access.log
# line 120,121: uncomment, comment out

output_dir /var/www/html/squid-reports
#
output_dir /var/lib/sarg
# line 132: add

resolve_ip
yes
# line 377: change to your language

charset
Japan
root@prox:~#
vi /etc/sarg/exclude_hosts
# write hosts you'd like to exclude from log reports

127.0.0.1
www.google.co.jp
root@prox:~#
vi /etc/apache2/conf-available/sarg.conf
# create new

<Directory "/var/www/html/squid-reports">
   
# IP address you permit

    Require local
    Require ip 10.0.0.0/24
</Directory>
root@prox:~#
mkdir /var/www/html/squid-reports

root@prox:~#
a2enconf sarg

Enabling conf sarg.
To activate the new configuration, you need to run:
service apache2 reload
root@prox:~#
/etc/init.d/apache2 restart

 * Restarting web server apache2
   ...done.

# generate reports

root@prox:~#
/usr/bin/sarg
# reports are generated daily by /etc/cron.daily/sarg

[2] Access to the "http://(server's hostname or IP address)/squid-reports/". it's Ok if following Squid report site is shown normally.
Matched Content
 
Tweet