Solved

Problem with Awstats and log files

Posted on 2009-06-29
2
1,883 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:OAC Technology
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 27

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

789 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