I'm trying to setup Awstats to formate Amazon S3 log files,but it keeps saying the log doesn't match the LogFormat, below is the configuration and log content:
LogFormat="%other %extra1 %time1 %host %logname %other %method %url %otherquot %code %extra2 %bytesd %other %extra3 %extra4 %refererquot %uaquot %other"
0dfbd34f831f30a30832ff62edcb8a93158c056f27cebd6b746e35309d19039c looxcie-data1 [18/Dec/2011:04:30:15 +0000] 75.101.241.228 arn:aws:iam::062105025988:user/s3-user E938CC6E4B848BEA REST.GET.BUCKET - "GET /?delimiter=/&prefix=data/prod/looxciemp4/0/20/&max-keys=1000 HTTP/1.1" 200 - 672 - 44 41 "-" "-" -
Then I execute the command and get following result:
root@test:/usr/local/awstats/wwwroot/cgi-bin# perl awstats.pl -update - config=www.awstats.apache.com
Create/Update database for config "/etc/awstats/awstats.www.awstats.apache.com.conf" by AWStats version 7.0 (build 1.971) From data in log file "/var/log/httpd/access.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Jumped lines in file: 0
Parsed lines in file: 1
Found 0 dropped records,
Found 0 comments,
Found 0 blank records,
Found 1 corrupted records,
Found 0 old records,
Found 0 new qualified records.
Can anyone help to figure it out?
===========================================
I found that the format "%logname" can not match such name arn:aws:iam::062105025988:user/s3-user
It is wired, but "%lognamequot" is able to match "arn:aws:iam::062105025988:user/s3-user"; This is the cause of this problem; But our system log file does include logname like arn:aws:iam::062105025988:user/s3-user; Is there anyone can help to figure it out why it doesn't match it?