Parsing IIS W3C Extended ...


 

Current User: Guest Login Register
Please consider registering

Search 
Search Forums:


 




Parsing IIS W3C Extended …

Add a New Topic Reply to Post
UserPost

3:17 am
January 22, 2008


Kris

Guest

Hello,

I installed AWStat today, I checked the procedure and no problem. But in this procedure, we have to change the log format, the "old" log are not more usable to generate stat. Then I switched back to the original parameter of IIS log :

W3C Extended + properties advanced (Date, Time, c-ip, cs-username, s-sitename, s-ip, s-port, cs-method, cs-uri-sterm, cs-uri-query, sc-status, sc-substatus, sc-win32-status, cs-user-agent)

Sample, extract from my real log file (I just replaced the ip by XXX and YYY) :

2008-01-22 08:48:16 W3SVC1139885586 xxx.XXX.XXX.XXX GET /default.aspx - 80 - 85.YYYY.YYYY.YYY Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-US;+rv:1.8.1.11)+Gecko/20071127+Firefox/2.0.0.11 200 0 0 

I tried to use your LogFormat found here : http://www.internetofficer.com/awstats/log-format/ 

But they don't work in my case.

Do you have others suggestions ?

Thanks for you help,

 

 

3:37 am
January 22, 2008


Jean-Luc

Admin

posts 220

Please copy here the line from your log file starting with :

#Fields:

Jean-Luc

4:24 am
January 22, 2008


Kris

Guest

#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status

 

Regards, 

4:42 am
January 22, 2008


Jean-Luc

Admin

posts 220

Your format is not compatible with AWStats. AWStats requires a %bytesd  field (called sc-bytes  by IIS). This field is the number of data bytes sent by the server to the client in each hit.

You can try to use the following LogFormat on your existing log file:

LogFormat="%time2 %other %other %method %url %query %other %logname %host %ua %code %other %bytesd"

You will get AWStats reports based on your log files, but all figures about bandwidth and number of bytes will be wrong.

Jean-Luc

7:52 am
January 22, 2008


Kris

Guest

Thanks Jean-Luc that's work fine :)

A small think when I execute this :

awstats.pl -config=myconfig_file -update 

and after this :

awstats.pl -config=myconfig_file -output -staticlinks > awstats.mysite.html  

In the HTML file I see only information from today and not from the begin of the month (web site started in january). Is it possible to launch a "full scan" for the directory log of this web site ?

 Thanks, 

8:29 am
January 22, 2008


Jean-Luc

Admin

posts 220

Have a look at logresolvemerge.pl. It can be used to merge all your log files. Don't forget to remove the existing AWStats database file for January (with today's data) before you start it.

Jean-Luc

1:18 am
February 14, 2008


Bindu Ramunoju

Guest

how can i use awstats for following log format??

#Fields: time c-ip cs-method cs-uri-stem sc-status

 i have logs in this format from 2007 and i'm configuring awstats now.

so how can i analyze old logs?????

 thanks in advance for any idea

 

Regards,

Bindu Ramunoju

2:55 am
February 14, 2008


Jean-Luc

Admin

posts 220

Same answer as above:

Your format is not compatible with AWStats. AWStats requires a %bytesd  field (called sc-bytes  by IIS). This field is the number of data bytes sent by the server to the client in each hit.

Does your "time" field include the date too ?

Anyway, you need to modify the file to make it compatible before you pass it to AWStats. I believe two changes might be required:

- time  field must become "date time";

- a "simulated" sc-bytes  field must be added.

Jean-Luc

3:13 am
February 14, 2008


Bindu Ramunoju

Guest

Thankq

Mr.Jean-Luc

ok tell me one thing more,

Now i can change my log to include %bytesd

but wht about the existing logs????

how can i change existing logs

if existing logs are not in format required by the awstats ,is it that awstats doesn't analyze them….

so it will only work for future logs not the existing Is it that??

 

Thanks in advance

Bindu Ramunoju

4:32 am
February 14, 2008


Jean-Luc

Admin

posts 220

AWStats cannot work on your existing logs, but you can edit your existing logs to make them compatible. For example, to simulate an sc-bytes  field, you should add " 100" at the end of each line. To do that, use a utility like sed. More info about sed for Windows is available from sed . . . the stream editor.

Jean-Luc

12:01 am
February 15, 2008


Bindu Ramunoju

Guest

Thanks a lot for your support

1:29 am
June 24, 2008


Patrick

Guest

reading my IIS logs i have this:


#Date: 2008-05-01 04:00:00
#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken


 LogFormat = “date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken”

giving me new records but have a lots of Unknown Errors. any idea what LogFormat should i put? Thanks in Advance

4:15 am
June 24, 2008


Jean-Luc

Admin

posts 220

Try this:

LogFormat = "%time2 %other %other %method %url %query %other %logname %host %other %ua %other %referer %other %code %other %other %bytesd %other %other"

4:30 am
June 24, 2008


Patrick

Guest

thanks a lot.. cheers for you Jean-Luc!

Add a New Topic Reply to Post


Reply to Topic: Parsing IIS W3C Extended …

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 3 + 1        (Required)

Topic Reply:


 

WebStats1


About the InternetOfficer.com forum

Currently Online:

4 Guests

Maximum Online: 20

Forums:

Groups: 2

Forums: 7

Topics: 103

Posts: 492

Members:

There are 25 members

There are 94 guests


Jean-Luc has made 220 posts

Top Posters:

Steve - 14

angelko - 4

cwei - 4

Kinglui - 3

vtroymck - 3

Administrator: Jean-Luc | Moderators: Jean-Luc


© Simple:Press Forum - Version 3.1.2 (Build 340)