LogFormat awstats "%t %h %u %m %f %s %b" # WARNING: You must use a tab char between % tags and not a space !
@@ -252,7 +254,7 @@ Download a file by FTP and check that your new log file looks like this:
2- Then setup AWStats to analyze the FTP log file:
-Copy config awstats.model.conf file to "awstats.proftp.conf".
+Copy config file "awstats.model.conf" to "awstats.ftp.conf".
Modify this new config file:
@@ -295,11 +297,68 @@ LogFile="/var/log/xferlog"
Now you can use AWStats as usual (run the update process and read statistics).
+
+With vsFTPd, or any FTP server that log with xferlog format:
+
+1- Check your server log file format:
+
+Take a look at your FTP server log file. You must have a format that match the following example to
+use this FAQ :
+|
+Wed Jan 01 19:29:35 2001 1 192.168.1.1 102 /home/file1.txt b _ o r username ftp 0 * c
+ |
+
+2- Then setup AWStats to analyze the FTP log file:
+
+If your FTP log file format looks good, copy config file "awstats.model.conf" to "awstats.ftp.conf".
+Modify this new config file:
+
+
+LogFile="/var/log/xferlog"
+ LogType=F
+ LogFormat="%time3 %other %host %bytesd %url %other %other %method %other %logname %other %code %other %other"
+ LogSeparator="\s"
+ NotPageList=""
+ LevelForBrowsersDetection=0
+ LevelForOSDetection=0
+ LevelForRefererAnalyze=0
+ LevelForRobotsDetection=0
+ LevelForWormsDetection=0
+ LevelForSearchEnginesDetection=0
+ ShowLinksOnUrl=0
+ ShowMenu=1
+ ShowMonthStats=UVHB
+ ShowDaysOfMonthStats=HB
+ ShowDaysOfWeekStats=HB
+ ShowHoursStats=HB
+ ShowDomainsStats=HB
+ ShowHostsStats=HBL
+ ShowAuthenticatedUsers=HBL
+ ShowRobotsStats=0
+ ShowEMailSenders=0
+ ShowEMailReceivers=0
+ ShowSessionsStats=1
+ ShowPagesStats=PBEX
+ ShowFileTypesStats=HB
+ ShowFileSizesStats=0
+ ShowBrowsersStats=0
+ ShowOSStats=0
+ ShowOriginStats=0
+ ShowKeyphrasesStats=0
+ ShowKeywordsStats=0
+ ShowMiscStats=0
+ ShowHTTPErrorsStats=0
+ ShowSMTPErrorsStats=0
+ |
+
+Now you can use AWStats as usual (run the update process and read statistics).
+
+
-FAQ-COM100 : SETUP FOR MAIL LOG FILES (POSTFIX, SENDMAIL, QMAIL, MDAEMON, EXCHANGE...)
+FAQ-COM100 : SETUP FOR MAIL LOG FILES (Postfix, Sendmail, Qmail, MDaemon, Exchange...)
PROBLEM:
-What do I have to do to use AWStats to analyze my mail log files.
+What do I have to do to use AWStats to analyze my mail log files ?
SOLUTION:
This tip works with AWStats 5.5 or higher.
@@ -374,7 +433,7 @@ messy data, no id to join multiple records for same mail, etc...).
For this reason, an "exact" log analysis is a joke with Exchange log files.
However a little support is provided. In order to analyze Exchange traffic, you have to
enable "Message Tracking" (see article http://support.microsoft.com/default.aspx?scid=kb;EN-US;246856).
-Copy config awstats.model.conf file to "awstats.mail.conf".
+Then copy config awstats.model.conf file to "awstats.mail.conf".
Modify this new config file:
@@ -417,8 +476,8 @@ LogType=M
Also don't forget that with Exchange, informations in a log analyses can't be exact.
Do not send any questions or requests for using AWStats with Exchange, this is not a problem in
AWStats and we have no time to support non opened products.
-If you want to have complete and accurate information, forget using AWStats or use a more serious
-mail serveur (Postfix, Sendmail, QMail...)
+If you want to have complete and accurate information with Exchange, forget using AWStats or use a
+more serious mail serveur (Postfix, Sendmail, QMail...)
@@ -1174,7 +1233,7 @@ You must use : LogFormat="%host %logname %time1 %method %url %other %code %by
and LogSeparator="\s+"
-If you use a FTP server like ProFTP:
+If you use a FTP server like ProFTPd:
See FAQ-COM090.
|
diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf
index 1e1be58d..dde8bc3d 100644
--- a/wwwroot/cgi-bin/awstats.model.conf
+++ b/wwwroot/cgi-bin/awstats.model.conf
@@ -76,11 +76,11 @@ LogType=W
# you must use following keys to define the log format string (See FAQ
# for ftp, mail or exotic web log format examples):
# %host Host client name or IP address
-# %lognamequot Authenticated login/user with format: "alex"
-# %logname Authenticated login/user with format: alex
+# %lognamequot Authenticated login/user with format: "john"
+# %logname Authenticated login/user with format: john
# %time1 Date and time with format: [dd/mon/yyyy:hh:mm:ss +0000] or [dd/mon/yyyy:hh:mm:ss]
# %time2 Date and time with format: yyyy-mm-dd hh:mm:ss
-# %time3 Date and time with format: Mon dd hh:mm:ss
+# %time3 Date and time with format: Mon dd hh:mm:ss or Mon dd hh:mm:ss yyyy
# %time4 Date and time with unix timestamp format: dddddddddd
# %methodurl Method and URL with format: "GET /index.html HTTP/x.x"
# %methodurlnoprot Method and URL with format: "GET /index.html"
diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
index 7cfee511..1715868b 100644
--- a/wwwroot/cgi-bin/awstats.pl
+++ b/wwwroot/cgi-bin/awstats.pl
@@ -3337,7 +3337,7 @@ sub Save_History {
my $month=shift||'';
my $xml=($BuildHistoryFormat eq 'xml'?1:0);
- my ($xmlbb,$xmlbs,$xmlbe,$xmlhb,$xmlhs,$xmlhe,$xmlrb,$xmlrs,$xmlre,$xmleb,$xmlee)=();
+ my ($xmlbb,$xmlbs,$xmlbe,$xmlhb,$xmlhs,$xmlhe,$xmlrb,$xmlrs,$xmlre,$xmleb,$xmlee)=('','','','','','','','','','','');
if ($xml) { ($xmlbb,$xmlbs,$xmlbe,$xmlhb,$xmlhs,$xmlhe,$xmlrb,$xmlrs,$xmlre,$xmleb,$xmlee)=("\n",'','',"\n" ); }
else { $xmlbs=' '; $xmlhs=' '; $xmlrs=' '; }
@@ -4890,7 +4890,7 @@ sub DefinePerlParsingFormat {
$PerlParsingFormat .= "\\\"?([^\\\"]*)\\\"?"; # logname can be "value", "" and - in same log (Lotus notes)
}
# Date format
- elsif ($f =~ /%time1$/ || $f =~ /%time1b$/) { # [dd/mmm/yyyy:hh:mm:ss +0000] ou [dd/mmm/yyyy:hh:mm:ss], time1b kept for backward compatibility
+ elsif ($f =~ /%time1$/ || $f =~ /%time1b$/) { # [dd/mmm/yyyy:hh:mm:ss +0000] or [dd/mmm/yyyy:hh:mm:ss], time1b kept for backward compatibility
$pos_date = $i; $i++; push @fieldlib, 'date';
$pos_tz = $i; $i++; push @fieldlib, 'tz';
$PerlParsingFormat .= "\\[([^$LogSeparatorWithoutStar]+)( [^$LogSeparatorWithoutStar]+)?\\]";
@@ -4899,9 +4899,9 @@ sub DefinePerlParsingFormat {
$pos_date = $i; $i++; push @fieldlib, 'date';
$PerlParsingFormat .= "([^$LogSeparatorWithoutStar]+\\s[^$LogSeparatorWithoutStar]+)"; # Need \s for Exchange log files
}
- elsif ($f =~ /%time3$/) { # mon d hh:mm:ss
+ elsif ($f =~ /%time3$/) { # mon d hh:mm:ss or mon dd hh:mm:ss yyyy or day mon dd hh:mm:ss or day mon dd hh:mm:ss yyyy
$pos_date = $i; $i++; push @fieldlib, 'date';
- $PerlParsingFormat .= "(\\w\\w\\w \\s?\\d+ \\d\\d:\\d\\d:\\d\\d)";
+ $PerlParsingFormat .= "(?:\\w\\w\\w )?(\\w\\w\\w \\s?\\d+ \\d\\d:\\d\\d:\\d\\d(?: \\d\\d\\d\\d)?)";
}
elsif ($f =~ /%time4$/) { # ddddddddddddd
$pos_date = $i; $i++; push @fieldlib, 'date';
@@ -5975,7 +5975,7 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat
}
elsif ($dateparts[0] =~ /^....$/) { my $tmp=$dateparts[0]; $dateparts[0]=$dateparts[2]; $dateparts[2]=$tmp; }
elsif ($field[$pos_date] =~ /^..:..:..:/) { $dateparts[2]+=2000; my $tmp=$dateparts[0]; $dateparts[0]=$dateparts[1]; $dateparts[1]=$tmp; }
- elsif ($dateparts[0] =~ /^...$/) { my $tmp=$dateparts[0]; $dateparts[0]=$dateparts[1]; $dateparts[1]=$tmp; $dateparts[5]=$dateparts[4]; $dateparts[4]=$dateparts[3]; $dateparts[3]=$dateparts[2]; $dateparts[2]=$nowyear; }
+ elsif ($dateparts[0] =~ /^...$/) { my $tmp=$dateparts[0]; $dateparts[0]=$dateparts[1]; $dateparts[1]=$tmp; $tmp=$dateparts[5]; $dateparts[5]=$dateparts[4]; $dateparts[4]=$dateparts[3]; $dateparts[3]=$dateparts[2]; $dateparts[2]=$tmp||$nowyear; }
if ($MonthNum{$dateparts[1]}) { $dateparts[1]=$MonthNum{$dateparts[1]}; } # Change lib month in num month if necessary
# Now @dateparts is (DD,MM,YYYY,HH,MM,SS) and we're going to create $timerecord=YYYYMMDDHHMMSS
|
|
|