Link to home
Start Free TrialLog in
Avatar of RLComputing
RLComputing

asked on

AwStats - Analyze multiple log files

Hi Experts,

I have just installed Awstats on a windows web server 2008 with IIS7. I can process individual log files, but not multple files at a time.

Here is my current config:

LogFile="C:\inetpub\logs\LogFiles\W3SVC69\u_ex%YY-24%MM-24%DD-24.log

Any ideas on how it can process all the exsisting log files in the folder?

Thanks!
Avatar of Mithrilhall
Mithrilhall

I'm not sure if you stumbled across this yet (logresolvemerge.pl)?

http://awstats.sourceforge.net/docs/awstats_tools.html
Use the perl script to merge multiple log files and pipe it to awstats with:

the line in the config then need to look like:

LogFile="../path/logresolvemerge.pl C:\LogFiles\W3SVC1*.log |"


more simply you can merge the log files before the execution of awstats in your batchfile with good old and simple DOS command:
copy /a C:\inetpub\logs\LogFiles\W3SVC69\*.log merged.log

and put that merged.log in the LogFile="..... above.
Awstats has a disadvantage that if you have processed the current log files than the older log files wont be processed.

So if you like to processed all the log files than manually edit the  Eg :: u_ex%100505.log date from where you would like the log files to be parsed.
 
Avatar of RLComputing

ASKER

I've changed my config file to this:

LogFile="C:\awstats\tools\logresolvemerge.pl C:\inetpub\logs\LogFiles\W3SVC69\*.log |"

then ran a manual update from the command line:

cd c:\inetpub\wwwroot\awstats
c:\perl\bin\perl.exe awstats.pl -config=domain.com

But it seems to be failing:

Create/Update database for config "./awstats.domain.com.conf" by AWStats v
rsion 7.0 (build 1.971)
From data in log file "C:\awstats\tools\logresolvemerge.pl C:\inetpub\logs\LogF
les\W3SVC69\*.log |"...
Phase 1 : First bypass old records, searching new record...
Direct access to last remembered record has fallen on another record.
So searching new records from beginning of log file...
Error: Command for pipe 'C:\awstats\tools\logresolvemerge.pl C:\inetpub\logs\Lo
Files\W3SVC69\*.log |' failed
Setup ('./awstats.domain.com.conf' file, web server or permissions) may be
wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Did I miss a step somewhere?

Thanks!
You must use the C:\awstats\tools\logresolvemerge.pl C:\inetpub\logs\LogFles\W3SVC69\u_ex110501.log Where 1st May would be the date from which you would like to start parsing your log file and then update it.

You have to update each date log file individually from the increasing order .

Also check for the permission over your W3SVC69 folder
I will only have to manually update the older log files correct? Once the the files are parsing it will happen automatically, correct?
Yes,But make sure that the new log files wont be parsed before the old one completed.

As already said the awstats is not backward compatible .
Here is what I've changed the config to. 4/17 was the day I setup Awstats and changed what is tracked by log files.

C:\awstats\tools\logresolvemerge.pl C:\inetpub\logs\LogFles\W3SVC69\u_ex110417.log

When I updated from CMD:

Warning: Syntax error line 51 in file './awstats.rlcomputing.com.conf'. Config line is ignored.
Error: LogFile parameter is not defined in config/domain file
Setup ('./awstats.rlcomputing.com.conf' file, web server or permissions) may be
wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

I've checked the docs directory and everything is setup as no security.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of RLComputing
RLComputing

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I was able to get stats to update with my solution