Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem with Awstats and log files

Posted on 2009-06-29
2
Medium Priority
?
1,953 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 1000 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 1000 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

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

705 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