Menu |
Configuration
|
|
This page is here to help you building manually your configuration
file. If you have a web server running, use the administration
interface as it's really easier to do that way.
First locate the config.pl file. Windows users should find it
in C:\Program Files\W3Perl\config.pl
Never comment any variable. If you don't know which values
to put, don't change anything. The scripts need to initialize these
variables to run.
|
 |
|
Platform specific
|
|
 |
|
In the first section, you just have to change
- $type_serveur
according to your OS.
Others don't need to be changed.
System used
|
$type_serveur
|
Select on which OS you're running W3Perl
|
|
Value |
Comment |
0 |
Unix |
1 |
Windows |
2 |
Lotus Domino |
|
|
 |
|
Logfiles
|
|
 |
|
- $logfile_format
First define your logfile format. If you don't know anything about
logfile format, just extract few lines from your logfile and compare them
with those lines.
Windows users running an IIS server can choose between :
- IIS format
- W3C format (default)
- CLF format
Note that W3C format entries are automatically detect.
Logfile format
|
$struct_logfile
|
Define the logfile format
|
|
Value |
Comment |
%host %null %login %date %hourshift %method %page %protocol %status %requetesize |
Common Log File |
%host %login %date %hour %null %null %null %null %null %requetesize %status %null %method %page |
IIS |
%hour %host %method %page %status |
W3C |
%date %transfert_time %host %requetesize %page %null %null %direction %null %login %method %null %null %status |
FTP |
|
- $struct_logfile
If you have changed the default value from your server configuration
file, put here your modification in the logfile format you are using.
- $struct_compressed_logfile
Then you'll need to inform the script about your log filename.
The list of keywords is
available here.
Log filename
|
$struct_compressed_logfile
|
Define the log filename
|
|
Value |
Comment |
%year.%month.%day.%prefixlog |
ex : 1998.03.20.access_log |
%prefixlog |
ex : access |
%prefixlog.%year-%lettermonth.log |
ex : access.2006-Mar.log |
|
- $date_format
IIS users have to specify the date format used as it had change over
IIS version.
If you choose the IIS format, use %day%month%year
If you choose the default W3C format, leave blank as there is no date
entries in the log, but if you add the 'date' field use %year%month%day
If you are using an older IIS version than 5.1, launch the IIS
administration interface and watch by yourself the date format used.
- $virtualfilter and $virtualCLF
If you are using only one logfile for several websites, virtual host is
included in the logfile so you can retrieve accesses for each websites.
- NECLF (New Extended Common Log File)
Virtual hosts are stored as a separate field
A typical logfile entries look like :
server.freshmeat.com - - [01/Jan/97:23:12:24 +0000] (www.iap.fr) "GET /fr/docs/config.html HTTP/1.0" 200 1220 "http://www.w3perl.com/" "Mozilla/5 (X11; I; Linux)"
pc202.club-internet.fr - - [01/Jan/97:23:12:24 +0000] (www.obspm.fr) "GET /index.html HTTP/1.0" 200 1220 "http://www.w3perl.com/softs/" "Mozilla/4.01 (X11; I; SunOS)"
where www.obspm.fr and www.iap.fr are the virtual hosts.
Select $virtualfilter = "www.obspm.fr" to parse only this virtual host
and bypass other virtual host.
- CLF (Common Log File)
Use $virtualCLF = 1 if virtual host is hidden in a Common Log File
like :
server.freshmeat.com - - [01/Jan/97:23:12:24 +0000] "GET http://www.iap.fr/fr/docs/config.html HTTP/1.0" 200 1220 "http://www.w3perl.com/" "Mozilla/5 (X11; I; Linux)"
- $retrieve_external_log
If set to 1, the logfiles will be downloaded from a remote server.
Then the following informations should be filled :
Variable |
Description |
Comment |
$wget_bin
|
The path to the wget tool
|
wget binary is already installed with W3Perl for Windows
|
$wget_user
|
user remote account
|
If logfiles are in a restricted area
|
$wget_pass
|
user remote password
|
If logfiles are in a restricted area
|
$wget_host_log
|
remote host
|
the host where the logfiles are stored
|
$wget_host_port
|
remote port number
|
default is 80 for a web server
|
$wget_host_dir
|
remote directory
|
directory where the logfiles are stored
|
|
 |
|
Path
|
|
 |
|
- $path
The output path where files will be created. Can be anywhere. Just make
sure W3Perl is able to write in the specified directory
(Eg : $path = "/export/home/www/htdocs/w3perl/")
- $pathinit
The W3Perl directory path (where the package have been installed)
(Eg : $pathinit = "/export/home/www/htdocs/w3perl/")
- $pathserver
The web server path where html can be found
(Eg : $pathserver = "/export/home/www/htdocs/")
- $linkpathserver
The relative path where your server's documents are stored
Usually $linkpathserver is / except for personal pages
(Eg : $linkpathserver = "/")
- $cgipath
The cgi-bin directory path
If you don't know the value, don't change anything.
(Eg : $cgipath = "/export/home/www/cgi-bin/")
- $fileroot
The path where logfiles are stored
(Eg : $fileroot = "/export/home/www/apache/logs/";
- $prefixlog
The name of your logfiles (found in $fileroot). If you are using split
logfiles, give the constant string ('access' for 'access.200610.gz')
usually 'access_log' for NCSA server, 'httpd-log' for CERN server,
Windows users can have 'ex' for W3C format (IIS), 'in' for IIS format
(IIS) or 'nc' for CLF format
(Eg : $prefixlog = "access_log")
- $referlog
The name of your referer log (found in $fileroot)
if you don't have such file on your server, leave blank.
(Eg : $referlog = "referer_log")
- $agentlog
The name of your agent log (found in $fileroot)
if you don't have such file on your server, leave blank.
(Eg : $agentlog = "agent_log")
- $errorlog
The name of your error log (found in $fileroot)
if you don't have such file on your server, leave blank.
(Eg : $errorlog = "error_log")
- $FLY
Path to the fly tool
Execute 'whereis <command>' or 'which <command>' to find the path.
(Eg : $FLY = "/usr/local/bin/fly" on Unix or $FLY = "C:/Program Files/W3Perl/fly.exe"
on NT)
- $GZIP
Path to the gzip tool
Execute 'whereis <command>' or 'which <command>' to find the path.
Don't delete the '-dc' option for gzip !
(Eg : $GZIP = "/opt/bin/gzip -dc" on Unix or $GZIP = "D:/bin/unzip" on Windows)
|
 |
|
Filter
|
|
 |
|
- $localserver
Name of your WWW server
(Eg : $localserver = "www.orstom.fr")
- $tri
Use '/' to scan everything from your root server. Otherwise, set a directory and only URL starting with your
value will be scanned. Useful if you want to scan only part of your server.
(Eg : $tri = "/subdirectory/")
- $country_filtering
To skip log entries from a country. Use country extension
(Eg : $contry_filtering = ".com" to exclude all hosts from .com)
- $nolog
To skip log entries from some servers or domains
(Eg : @nolog = ('194.51.174','.grolier.') exclude 194.51.174.* and all grolier hosts)
- @selection
If you need very detailed stats about some HTML pages ... don't specify too much !
(Eg : @selection = ('/raydream/index.html'))
- @selecrepert
Graphic stats for some subdirectories, should be in the same depth
level. Usually give main subdirectories.
(Eg : @selecrepert = ('/raydream/','/astro/'))
- @excluderepert
To exclude report for these subdirectories
(Eg : @excluderepert = ('/private/'))
- $precision
Set the level of report. Default is 3
(Eg : $precision = 1 to 4)
- $locallog
If you want to log your domain server also.
(Eg : $locallog = 1 will also compute log for your domain)
- $localonly
If you want to log ONLY your domain server
(Eg : $locallog = 1 will compute log ONLY for your domain)
- $zip
Set to 1 if you have compressed logfiles.
(Eg : $zip = 0 for uncompressed log files or $zip = 1 for compressed log files)
- $zipcut
If your logfile are split. Set to '1' for monthly, '2' for daily
logfiles, or '3' for apache rotation logfiles
(Eg : $zipcut = 0 mean only one log file)
- Threshold
- $topten
List only the $topten most successful files
(Eg : $topten = 10)
- $seuilpage
Show only files with more than $seuilpage requests.
It avoid to have too large files results.
(Eg : $seuilpage = 100)
- $seuilsite
List only sites with more than $seuilsite requests
(Eg : $seuilsite = 9 to show sites with 10 accesses and more)
- $seuilscript
List only scripts with more than $seuilscript requests
(Eg : $seuilscript = 5 to show scripts used more than 5 accesses)
- $seuilrepert
List only directory with more than $seuilrepert accesses
(Eg : $seuilrepert = 0 to show all directories requests)
- $optdirsize
Type of graphs for directories traffic
1-2-3 html (total, external, domain)
4-5-6 all (total, external, domain)
(Eg : $optdirsize = 4 external and internal traffic for HTML, GIF...)
- $nbdays
Number of days for the daily graphs (0 for the year)
(Eg : $nbdays = 50)
- $virtualserver
Select one web server to filter your NECLF (only applicable with NECLF logfile)
(Eg : $virtualserver = "www.detector.com")
- $defaulthomepage
Default HTML page returned when your httpd server produced "/"
(Eg : $defaulthomepage = "index" (usual one))
- $titlename
Convert URL to the string included in your title's document
(Eg : $titlename = 1 if yes)
- $localdomaine
Add here IP hosts in your $localdomainename (if these hosts don't have DNS)
(Eg : $localdomaine = "$localdomainename|^145\.238\.44\.[4567]" will
add hosts 145.238.44.4 to 7 with your domain hosts)
- $mailadr
Your email if some users want to modify your configuration file.
If people want precise infos on their pages, you should add
their URL in @selection in config.pl file
(Eg : $mailadr = "webmaster\@hplyot.obspm.fr")
- $tildealias
Your alias for users HTML directory
(Eg : $tildealias = "public_html" or "www")
- $yellowfile
Need if you use yellow page NIS for your intranet DNS
(Eg : $yellowfile = "" don't use yellow page)
- $reverse_dns
Will convert IP address to name server (WARNING : very slow !!!)
(Eg : $reverse_dns = 1 will activate)
Extensions to scan
|
@extension
|
Select which extensions to parse
|
|
Value |
Comment |
('html','htm','shtml') |
parsing html files |
('html','htm','shtml','php','php3') |
parsing html and php files |
('html','php') |
parsing html and php only |
('rm','ra','smi','smile','ram') |
parsing realserver files |
|
@extensionimage
|
Select which extensions to parse
|
|
Value |
Comment |
('gif','jpg','jpeg') |
parsing gif and jpeg images only |
('jpg','gif','png') |
parsing gif, jpg and png images |
|
|
 |
|
Display
|
|
 |
|
- @homepages
Filename for your different language
You should have the same number of elements than @lang. Default
language homepage should be 'index'
(Eg : @lang = ('index','index-fr') if you select english and french
ouput and english is default)
- @lang
Choose your languages output. Use country extension. List of language
available is in resources/lang/
(Eg : @lang = ('uk','fr') if you need english and french ouput)
- $frame_updown
Choose top-bottom or right-left frames
(Eg : $frame_updown = 1 means top-bottom frames)
- $topframelinks : configure your own link in the top frame
(Eg : $topframelinks = "My_server")
- $bargraph (bar chart) , $tridim (3D bar chart) , $linegraph (line) , $fillgraph (filled lines)
Set to 1 which output you want
(Eg : $tridim = 1 for 3D bar chart)
- People without CSS
- $custom_text
Use your own color for text
(Eg : $custom_text = "#000000" for black)
- $custom_link
Use your own color for link
(Eg : $custom_link = "#000080")
- $custom_vlink
Use your own color for vlink
(Eg : $custom_vlink = "#800000")
- $bgcolor
Use your own color for background
(Eg : $bgcolor = "#FFFFFF")
- $background and $backgrd
If you want to use a background for fun
Put your image in /w3perl/resources/ or make a symbolic link from this
directory
(Eg : $background = "background.gif" and set $backgrd = "BACKGROUND=\"$background\"")
|
 |
|
Scripts
|
|
 |
|
- Scripts running
Set to '1' which scripts you want to run.
$actif_inc is for incremental stats.
$actif_real is for real time stats.
$actif_hour is for hourly stats.
$actif_day is for daily stats.
$actif_week is for weekly stats.
$actif_month is for monthly stats.
$actif_agent is for agent stats.
$actif_refer is for referer stats.
$actif_session is for session stats.
$actif_error is for error stats.
$actif_history is for CPU stats.
$actif_url is for document stats.
Scripts you may want to disable is url, session, history, error,
real. Leave others actif.
- When to update
Set the number of day between two run for each script. '1' mean a
daily run. $url_launch, $week_launch may be set to one week '7'.
$month_launch may be set to a month '30'.
- When to run
|