analog.module implementation guide

A blank
analog.module
Implementation Guide
by Peter Hill
Modulus Pty. Ltd.
Original 19/10/2006
A cluster of hexes
A blank

Introduction

This is the implementation guide for the Modulus analog.module, versions 1.3.1 and later. It is assumed that the reader is familiar with HTML and execution of CGI scripts.

analog.module gives your websites detailed log-file analysis information which allows you to fully understand the patterns of traffic flow to your websites.

analog.module provides proper analysis of discrete visits to your websites, not just web-site hits, including the distribution over the week and the distribution over the day, so that responsiveness to promotion can be directly measured. The analysis and selection of reports are highly configurable and aum analog can deal with logs in "WWW common log", "FTPd log", "NCSA combined log" and "Apache multi-homed log" formats.

Installation

The module comprises a Perl file ("analog.pl") and a configuration file ("analog.cfg"). Both files should be installed in your CGI-BIN executable path; we suggest to install in a dedicated directory, e.g.:
...your site.../cgi-bin/analog/analog.pl
...your site.../cgi-bin/analog/analog.cfg
Make sure to set permissions executable, e.g. 0755 for *NIX. In addition, there are some image files and a country codes text file ("country_codes.txt"). The images should be copied to an appropriate directory on your server, which might typically be, say:
...your site.../images/analog
Likewise the country codes text file needs and appropriate home, e.g.:
...your site.../ analog/country_codes.txt

Configuration

Configuration comprises setting variables in the configuration file to appropriate settings.
$cfg_imageURL: This is the URL at which you have stored the analog.module images, e.g. http://www.yoursite.com/images/analog
$cfg_countriesFile: This is the directory and file specification of the country codes text file e.g. /users/home/yoursite/web/public/analog/country_codes.txt
$cfg_logFile: This is the directory and file specification of the log file to be analysed e.g. /users/home/yoursite/logs/access.log
$cfg_styleSheet: The URL for the Cascading Style Sheet used, e.g. http://www.yoursite.com/css/analog.css
$cfg_timeAdjust: The time adjustment is the time difference in hours between the time of the server and you local time, e.g. for Australian reporting using a US-based server, this might be set as 10.5, representing 10 hours and 30 minutes.
$cfg_zcat: This is the directory and program name of the decompression program needed for decompressing compressed log files, e.g. '/usr/bin/gzip –cd'
$cfg_logType: This is the type of log file to be analysed. Values are 'common' (WWW common log format), 'combined' (NCSA combined log format), 'ftp' (FTPd log) or 'apache' (Apache multi-homed log)

Run Parameters

In addition to the basic configuration, a number of run-time parameters can be set as CGI form variables which will affect the operation of analog.module.
analog.module_logType: Overrides the configuration variable $cfg_logType.
analog.module_excludeDomain: Set this variable to exclude a particular domain from the log analysis. This can be a regular expression.
analog.module_topFileListFilter: For the "Top nn files" report, this filter can be used to exclude some files. This can be a regular expression.
analog.module_includeOnlyDomain: Set this variable to include only a particular domain in the log analysis. This can be a regular expression.
analog.module_includeOnlyRefsTo: Set this variable to limit log analysis to entries which refer to a particular file. This can be a regular expression.
analog.module_excludeRefsTo: Set this variable to exclude references to a particular file from log analysis. This can be a regular expression.
analog.module_topNFileLimit: Sets a limit to the number of files with the most activity reported.
analog.module_topNArchiveSectionsLimit: Sets a limit to the number of archive sections with the most activity reported.
analog.module_topNDomainsLimit: Sets a limit to the number of domains with the most activity reported.
analog.module_reportName: Overrides the configuration variable $cfg_reportName
analog.module_printFiles: Checkbox control, when checked causes to be printed.
analog.module_printSummary: Checkbox control, when checked causes summary to be printed.
analog.module_printHourlyStats: Checkbox control, when checked causes hourly statistics to be printed.
analog.module_printDailyStats: Checkbox control, when checked causes to be printed.
analog.module_printTopLevelDomains: Checkbox control, when checked causes to be printed.
analog.module_printDomains: Checkbox control, when checked causes to be printed.
analog.module_printArchiveSections: Checkbox control, when checked causes to be printed.
analog.module_printDOWAnalysis: Checkbox control, when checked causes day-of-week analysis to be printed.
analog.module_lookupHosts: Checkbox control, when checked causes URL names of IP addresses to be reverse looked-up. This option may significantly slow down report generation.
analog.module_processLog: Overrides the configuration variable $cfg_logFile.

Implementation Problems

If you experience problems with the implementation, contact Modulus for assistance.


Copyright © 2006 Modulus Pty. Ltd.