Solved

Problem with Awstats and log files

Posted on 2009-06-29
2
1,924 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

734 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