Tuesday, February 3, 2009

AWStats log analyzer Error

D:\WebSites\Apache2.2\cgi-bin\awstats> perl awstats.pl -config=site1.test.local -update

Create/Update database for config "./awstats.site1.test.local.conf" by AWStats version 6.9 (build 1.925) From data in log file "C:\WINDOWS\system32\LogFiles\W3SVC582832298\ex090105.log" ...

Error: Your personalized LogFormat does not include all fields required by AWStats (Add %bytesd in your LogFormat string). Setup ('./awstats.tmp.mydomain.conf' file, web server or permissions) may be wrong. Check config file, permissions and AWStats documentation (in 'docs' directory).

mrcoffee365: AWStats does not read the default IIS log format without some configuration. Put the following Log format in your awstats awstats.model.conf file:

# Use this LogFormat for limited IIS log (default log format from IIS 6)
LogFormat="date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-bytes"

Don't put line break in.

A format like this works well for IIS logs:

When you run awstats, you can also specify which file you want it to run on (as long as it is where you specified for the LogFile location above):

perl c:\awstats-6.5\wwwroot\cgi-bin\awstats.pl -config=mymodel -LogFile="C:/WINNT/system32/LogFiles/W3SVC3/ex061123.log" -update

Again, no line breaks.

psimation:Hi Mrcoffee365

Thx alot for that, the first part should definately work.

However, do you perhaps know how I can modify the .conf fil to include ALL the log files I already have on file?
I'd hate to have to run that command 180 time manually ( I've basically got 180 days worth of log files that I need AWSTATS to process...)

mrcoffee365:I don't think there's an AWStats way to run it against multiple files at once. You can write a script file which creates each log file name. Or cut and paste the lines into a big .bat file.

No comments: