Solved

Problem with Awstats and log files

Posted on 2009-06-29
2
1,875 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel Hyperlink Question 4 50
Shopping Cart 2 74
what are list of ebay api errors 1 19
Wordpress plugins not working in html 3 25
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
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).

809 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