Using Advanced IIS logging with Awstats to track SP2010 internet site statistics

We are currently trying to configure Awstats to compile all of our SP internet traffic statistics, and because we are behind an F5 load balancer we had to enable Advanced IIS logging so we could get source IP address, (otherwise Awstats says we only have 1 visitor, and that's the F5).  The problem is that with multiple WFE's we need to use the logresolvemerge command to merge the various WFE's log files into one.

This was relatively easy with normal IIS logs.  We just had the following script figure out yesterday's date and merge the logs:

# get yesterday's date
my ($sec, $min, $hour, $mday, $mon, $year) = localtime();
my $yesterday_midday=timelocal(0,0,12,$mday,$mon,$year) - 24*60*60;
($sec, $min, $hour, $mday, $mon, $year) = localtime($yesterday_midday);
my @abbr = qw(01 02 03 04 05 06 07 08 09 10 11 12);
my $yesterday = sprintf"%2d%s%02d", $year= sprintf("%02d", $year % 100),$abbr[$mon],$mday;
# save the date with the required log file convention
my $yest = "u_ex${yesterday}.log";
#system($yest);

# use $yest as filename for logs from different servers. "\" has been used to escape characters
system("perl C:\\inetpub\\awstats\\cgi-bin\\logresolvemerge.pl \\\\123ms538\\Logs\\123.com\\W3SVC593474230\\$yest \\\\123ms539\\Logs\\123.com\\W3SVC593474230\\$yest > D:\\Logs\\MergedLogs\\$yest");

The problem is that with Advanced IIS logging our log files are named this:  123MS538-Server-123.com_D20140107-211054005.log

(and yes, I'm substituting 123 for some things)

I can't figure out how to either get rid of the stuff after the - behind the date, or come up with some way to have the script just ignore all of that and treat it like one big wild card.  Something long the lines of -????????.log.

Any help or suggestions is appreciated.

Ted

January 24th, 2014 4:29pm

Can you use the Usage and Logging service built into SharePoint instead?
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2014 4:46pm

We were going to use this for the business users, and wanted something a little  prettier than what SP provides.

Ted

January 24th, 2014 5:12pm

What I was thinking is that SharePoint is going to provide more accurate statistics than the IIS logs will. They're presented in Excel, but can be exported/manipulated, or you can use something like SSRS to connect to the database and provide customized (or even self-service) reports.
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2014 5:17pm

Hi,

Have you tried the SharePoint Diagnostic studio 3.0,It aggregates data with multiple parameters from your farm including the http requests and allows you to export data in excel format for further scrutinize.

Product Info link : SPDiag 3.0

Download link:
SharePoint 2010 Administrator Toolkit

January 25th, 2014 1:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics