Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

AwStats - Analyze multiple log files

Posted on 2011-04-29
10
Medium Priority
?
5,912 Views
Last Modified: 2012-05-11
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!
0
Comment
Question by:RLComputing
10 Comments
 
LVL 2

Expert Comment

by:Mithrilhall
ID: 35495946
I'm not sure if you stumbled across this yet (logresolvemerge.pl)?

http://awstats.sourceforge.net/docs/awstats_tools.html
0
 
LVL 7

Expert Comment

by:franka
ID: 35496386
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.
0
 
LVL 4

Expert Comment

by:vaibhavjaiman
ID: 35504915
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.
 
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:RLComputing
ID: 35505143
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!
0
 
LVL 4

Expert Comment

by:vaibhavjaiman
ID: 35505272
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
0
 
LVL 1

Author Comment

by:RLComputing
ID: 35509645
I will only have to manually update the older log files correct? Once the the files are parsing it will happen automatically, correct?
0
 
LVL 4

Expert Comment

by:vaibhavjaiman
ID: 35510461
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 .
0
 
LVL 1

Author Comment

by:RLComputing
ID: 35513269
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!
0
 
LVL 1

Accepted Solution

by:
RLComputing earned 0 total points
ID: 35712454
I was able to get the logs to work going forward. I didn't bother purging the old log files but here was the solution.

Change log file to:

LogFile="C:\inetpub\logs\LogFiles\W3SVC69\u_ex%YY%MM%DD.log
then setup a windows batch file to run once a day to update stats to web GUI

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

Thanks for the help everyone!

0
 
LVL 1

Author Closing Comment

by:RLComputing
ID: 35744730
I was able to get stats to update with my solution
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Integration Management Part 2
Loops Section Overview
Suggested Courses

564 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