SARG ( Squid Analysis Report Generator )- Installation & Configuration
Last updated on March 12th, 2018 at 09:24 pm
Hi Linux-fanatics, welcome again to a nice new tutorial. We will be discussing SARG (Squid Analysis Report Generator).
It is an Open-Source tool, which helps us analyze Squid Proxy logs & generates reports in HTML format with all the information from logs presented in nice & easy to understand format.
& It gives information about User’s IP addresses , total & individually used bandwidth etc with access to Daily, Weekly & Monthly reports.
( Also read : Setting up SQUID AUTHENTICATION )
The process for installing sarg on Centos/Redhat is a bit complicated, as it needs to be compiled from source. To do that, firstly we need to install required packages to download & compile the package
Secondly, download ppackage from the link mentioned in below
now, we will extract the package & will than compile the package
Now that’s the installation is complete, we will configure it as per our needs by making changes in configuration file
Firstly, uncomment the line starting with access_log & add path for squid access log. Next, provide output directory for reports next to line starting with output_dir & also select your desired time format, change line with date_format
& lastly , set overwrite report to yes
To create squid analysis report, we have to enter following command
Note: It may take a while depending on number of users accessing squid proxy.
To access the report, enter below mentioned URL in web-browser
Now, we have all the squid analyzed logs in nice, sorted &easy to understand format
Note : you can also create a cron–job to schedule a report being generated automatically at the time of your choosing.
This will generate a report every 4th hour.
And I thank you all for reading. If have any doubts or suggestions, please feel free to leave comments down below.