I have installed AWStats on my PC to analyse our web server logs which hosts the web-frontend to a data warehouse. The web server in use is IIS v6. After playing around with the AWStats config file I have managed to generate the stats database as well as the HTML reports. However no matter what LogFormat string I use, AWStats just won't recognize the %logname field.
Please note that my logs do not have the sc-bytes/bytesd field so I'm substituting the sc-win32-status field for sc-bytes.
This is the format of my IIS log:
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-substatussc-win32-status
These are the LogFormat strings I've tried using iin my config file
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-bytes
I tried removing the domain name so that the logname field simply showed john.doe, I then tried using double quotes and using lognamequot. None of these approaches work! Also I've set DNSLookup=0 in the config file. So, from what I understand, AWStats is forced to use the user name…but it won't!
AWStats simply picks up the IP address and shows this in the “hosts” section of the report. I want it to use the actual, authenticated user name instead since everyone accessing our website must have a user name.
Thanks Jean-Luc, your LogFormat string worked perfectly. It never occurred to me to ignore the IP addresses and only specify the log name.
The only problem I now have is that in the "Visitors domains/countries" section it seems to assume that the log name specifies the domain as well, so for example a user who is logged as mydomain\\john.doe (which is the format for any user accessing our site) AWStats thinks that "john" is the domain and "doe" is the country!
This isn't a problem really because only internal domain users access the site but any ideas on how I might be able to tell AWStats not to do the domain/country bit?
Again, I should have browsed the config file a bit more carefully! So how is it that you know AWStats inside out? Are you one of the developers? Or do you implement it at client sites?
By the way, you wouldn't happen to be a Microsoft SQL Server Reporting Services (SSRS) expert, would you? :)
I am no AWStats developer, but I have implemented it at thousands (literally) of sites. I am also making all kinds of special developments for clients around AWStats.