http://sourceforge.net/projects/sarg/files/sarg/sarg-2.3.1/sarg-2.3.1.tar.gz/download
# tar -zxvf sarg-2.3.1.tar.gz
# cd sarg-2.3.1/
# ./configure
# make
# make install
=========================================================
Main sarg configuration file: /usr/local/etc/sarg.conf
# vim /usr/local/etc/sarg.conf
# This is sample configuration, that you need to setup
access_log /var/log/squid/access.log
graphs yes
graph_days_bytes_bar_color orange
title “Squid User Access Reports”
temporary_dir /tmp
output_dir /var/www/html/reports/
==========================================================
# vi /etc/httpd/conf.d/sarg.conf
Alias /sarg /var/www/html/reports/daily
DirectoryIndex index.html
===========================================================
vim sarglog.sh
#!/bin/bash
#Get current date
TODAY=$(date +%d/%m/%Y)
#Get one week ago today
YESTERDAY=$(date –date “1 day ago” +%d/%m/%Y)
/usr/local/bin/sarg -l /var/log/squid/access.log -o /var/www/html/reports/daily -z -d $YESTERDAY-$TODAY
exit 0
============================================================
# crontab -e
00 01 * * * /root/sarglog.sh
============================================================
# tar -zxvf sarg-2.3.1.tar.gz
# cd sarg-2.3.1/
# ./configure
# make
# make install
=========================================================
Main sarg configuration file: /usr/local/etc/sarg.conf
# vim /usr/local/etc/sarg.conf
# This is sample configuration, that you need to setup
access_log /var/log/squid/access.log
graphs yes
graph_days_bytes_bar_color orange
title “Squid User Access Reports”
temporary_dir /tmp
output_dir /var/www/html/reports/
==========================================================
# vi /etc/httpd/conf.d/sarg.conf
Alias /sarg /var/www/html/reports/daily
DirectoryIndex index.html
===========================================================
vim sarglog.sh
#!/bin/bash
#Get current date
TODAY=$(date +%d/%m/%Y)
#Get one week ago today
YESTERDAY=$(date –date “1 day ago” +%d/%m/%Y)
/usr/local/bin/sarg -l /var/log/squid/access.log -o /var/www/html/reports/daily -z -d $YESTERDAY-$TODAY
exit 0
============================================================
# crontab -e
00 01 * * * /root/sarglog.sh
============================================================
Hi thanks for your post, can you put somewhat more in details, like how to access (use) this one...
ReplyDeleteRegards,
Sandeep CC
just type on web browser http://your ip/sarg
Deletefirst you must start httpd service
service httpd start
After following all above process,
DeleteThe webpage cannot be found
*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.18 but the autoconf macros are from gettext version 0.19
ReplyDelete