Solved

Problem with Awstats and log files

Posted on 2009-06-29
2
1,855 Views
Last Modified: 2013-12-07
When I open Awstats on our web server, I get the error attached below. I am assuming I need to change the LogFormat to something else, but it says that 2 is for IIS. Any ideas? Thank you!

The error in Awstats:

AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file C:\WINDOWS\system32\LogFiles\W3SVC1761934906\extend1.log must have a bad format or LogFormat parameter setup does not match this format.

Your AWStats LogFormat parameter is: 2
This means each line in your web server log file need to have "MSIE Extended W3C log format" like this:
date time c-ip c-username cs-method cs-uri-sterm sc-status sc-bytes cs-version cs(User-Agent) cs(Referer)

And this is an example of records AWStats found in your log file (the record number 50 in your log):
2007-08-08 01:29:54 GET /icon/other/he.png - - 66.41.140.117 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.8.1.6)+Gecko/20070725+Firefox/2.0.0.6 http://www.OURDOMAINNAME.com/cgi-bin/awstats.pl?framename=mainright&update=1 404 1795


Setup ('D:\websites\OURDOMAINNAME\cgi-bin/awstats.www.OURDOMAINNAME.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
0
Comment
Question by:DataDudes
2 Comments
 
LVL 15

Accepted Solution

by:
Tray896 earned 250 total points
ID: 24747936
The default log format for IIS is actually the W3C Extended Log File Format.  This can be confusing since there is also a "Microsoft IIS Log File Format", but that is rarely used.  I would reconfigure AWStats to look for W3C and see if this works.  You can verify what log format you are using by going to the properties of your sites and see what is listed under "Active log format."
0
 
LVL 26

Assisted Solution

by:mrcoffee365
mrcoffee365 earned 250 total points
ID: 24748583
The Web log formats offered by default in Awstats do not work, and neither does the W3C.

This question is asked frequently on EE.  See these for other answers:
http://www.experts-exchange.com/Web_Development/WebTrends_Stats/Q_22499309.html
http://www.experts-exchange.com/Web_Development/WebTrends_Stats/Q_22931683.html

The main problem is that AWstats requires a bytes value in order to run.  The IIS logs do not have sc-bytes by default.  You can add that to your IIS logs, and use the log format string in the logs output as the custom log format in your AWStats config file.

Or if you have to read old logs which do not have that value, call another number in the log sc-bytes.

Post back if you need help with all of this.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Read about why website design really matters in today's demanding market.
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now