loggingconfigawstats

AWStats logfile format issue


I am currently trying to fix my log files to display AWStats correctly. I had this work up until i tried getting Bandwidth to show up. I changed the IIS log files to include sc-bytes cs-bytes, then went into my config file and added it to the logformat and added for them. Here is what the format looks like.

#Fields: date time 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 sc-bytes cs-bytes time-taken

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

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

Here is what a real log looks like

2015-06-07 00:03:07 192.168.128.125 POST /ISAPI/DLSapiWP.dll/Rest/heartbeats/ISWEEP153-1/iSweep - 80 - 173.162.54.105 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9.0.10)+Gecko/2009042316+Firefox/3.0.10 200 0 0 960 1227 733

After I changed the log format AWStats doesn't seem to update at all. What is it that I am missing or forgetting to do? Any point in the right direction would help.

Things that I have tried:

  1. Deleting the AWStats data history for the month.
  2. Run the script manually

Solution

  • Turns out that the old log files and the new log files are not compatible. In order for this to work, I needed to delete all of my old logs and run AWStats on the new ones. However, I was able to keep the old month history so i didn't lose the data.

    Process:

    1. Run AWStats on first set of logs
    2. Delete old logs, keep month history
    3. Add new logs with bytes
    4. Run AWStats on those.

    The bandwidth doesn't show up for the old ones but for the new ones they work out just fine.