I have a problem when using AWSTATS to analyse my apache logs.
In the past everything worked well.
But now the log format has changed for my server.
Old format example:
194.206.22.25 - - [14/Dec/2009:12:23:33 +0100] "GET /gPM-Systems/css/default.css HTTP/1.1" 404 1036
New format example:
356652,mics,194.206.22.24,194.206.22.24,-,[05/Jul/2011:15:11:18 +0200],"GET /index.html HTTP/x.x",302,-
For the old format the good LogFormat to choose was 4. Now it is this custom format:
LogFormat="%other %other %host %other %logname %time1 %methodurl %code"
I also changed the LogSeparator to set "," instead of " ".
My problem is that all records are dropped.
-showdropped option shows that:
Dropped record (method/protocol 'GET /apache_pb.gif' not qualified when LogType=W): 356652,mics,194.206.22.24,194.206.22.24,-,[05/Jul/2011:15:11:18 +0200],"GET /apache_pb.gif HTTP/1.0",302,-
I had a similar issue when I changed the format of my logs. The format was changed, as well as using tab as the field separator, and this caused the same error.
For the
LogFile
configuration option, I was already using a pipe. So I switched the tab out for a space by addingtr '\t' ' ' |
to the end. Then I modified the AWStats config to separate on spaces.I was able to get AWStats to parse the logs after this. Perhaps it will work for you as well.
If you are not already using a pipe for the
LogFile
configuration option, you can usecat
to get the files intotr
.