Title: Installation, Configuration and Usage guide: Squid log analyzer, Webalizer and Calamaris BURUCA Team BURUCA Team Members: ECTS: Code Email Ernest Rwandalla (Project Manager) 30 IK2209 ernestr@kth.se Federico Enni 15 IK2200 enni@kth.se Narayanan Anandpadmanabhan 15 IK2200 naap@kth.se Ahmad Moeed Aslam 15 IK2200 ahmadasl@kth.se Roman Mbwasi 24 IK2208 mbwasi@kth.se Imran Ali 24 IK2208 imrania@kth.se Niranjanan Kalaicelvan 15 IK2200 nirkal@kth.se Project Champion: Bjorn Pehrson bpehrson@kth.se Project Coach: Hans Eriksson hansa@me.com Project Owner: Amos Nungu amnungu@kth.se Page 1 of 5
Index Title: Installation, Configuration and Usage guide: Squid log analyzer, Webalizer and Calamaris 1 Versions History 2 1. Squid-log analyzer 3 3 3 3 Output: 3 2. Webalizer 4 4 4 4 3. Calamaris 5 5 5 5 4. References 5 Versions History Version Description Date Changes Modifier 1.0 Draft Version 8/11/2010 Initial version Niranjanan Page 2 of 5
1. Squid-log analyzer The software is free and available at http://sourceforge.net/projects/squidlog/files/ Download and unpack the package, save it in the directory of your choice. The package comes with a configuration file 'squidlog.conf' The squidlog.conf should be updated with the path to squid access log that must be parsed and analyzed. log_file <path to squid access.log file> The package comes with a start script and once the parsing is complete, it generates an html report containing the statistics. niranjanan@ubuntu:~/desktop/squidlog-1.0-pre2$ sudo./start [sudo] password for niranjanan: Generating squidlog.htm...finished. Output: The squidlog.htm shows the % requests served from cache and % requests fetched from the Internet/origin web server. Page 3 of 5
2. Webalizer Install webalizer using the Synaptic packer manager, available in System->Administration. Alternatively use the command line tool aptitude, > sudo apt-get install webalizer The webalizer.conf is available in the path /etc/webalizer. The following configuration options must be set. > LogFile <path to squid access.log file> > LogType squid (other available types are clf, ftp) > OutputDir /var/www/webalizer (default path) Run the following command, > sudo webalizer <path to squid access.log file> Now the output dir /var/www/webalizer where the generated reports will be available. The html report provides the top visited url based on % requests and also the bandwidth consumed for each url. Page 4 of 5
3. Calamaris Install Calamaris using the synaptic packer manager, available in System->Administration. Alternatively use the command line tool aptitude, > sudo apt-get install calamaris Default target directories are under /var/www/calamaris. They are not created by default. Please do so if you need them. Calamaris works quite well with the default configuration and does not require any changes. However if need arises, the configuration can be updated in the file located at /etc/calamaris/calamaris.conf. Caching: --cache-input-file -i file input-datafile for caching, to add many files separate them with an ':') --cache-output-file -o file output-datafile for caching, can be the same as --cache-input-file Note: Calamaris require native squid log formats and does not support httpd log format. So set the emulate_httpd_log tag in squid.conf to 'off'. It is 'off' by default. 4. References 1. http://squidlog.sourceforge.net/ 2. http://www.webalizer.org/ 3. http://cord.de/tools/squid/calamaris/ Page 5 of 5