Awstats not recognizing browsers or operating systems...
Hello forum...
I've had awstats 6.7 up and running for some time, on an RHEL 4 box. It's been analyzing access logs from an apache 2 installation on another server without any major issues.
Due to bureaucratic concerns, I couldn't get User Agent and Referrer logging turned on until recently.
I expected, after enabling the additional logging, to see these stats finally start populating in my summary report, but the product isn't reporting/parsing them somehow.
I then noticed that my LogFormat directive in the awstats conf file was still parsin based on the common log format, which doesn't include referrer or user agent. I changed the LogFormat directive, and it gives me the following:
Create/Update database for config "/etc/awstats/awstats.tb002.conf" by AWStats version 6.7 (build 1.892)
From data in log file "/opt/apache/logs/web100/access_log"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 68981)
AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file /opt/apache/logs/web100/access_log must have a bad format or LogFormat parameter setup does not match this format.
Your AWStats LogFormat parameter is:
1
This means each line in your web server log file need to have "combined log format" like this:
<remote ip> - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"
And this is an example of records AWStats found in your log file (the record number 50 in your log):
<remote ip> - - [12/Oct/2007:11:56:40 -0500] "POST <name of resource> HTTP/1.1" 200 2229
Setup ('/etc/awstats/awstats.tb002.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
I've come to realize that is because some entries in my log file don't have referrer or user agent info, because these entries are made by a custom application of ours. I'm hoping my only recourse isn't to somehow split the logs prior to being read by awstats, and to have two installs that will parse the logs using two different LogFormat's. Is there a way to get awstats to accommodate two different LogFormat directives, and have the info in the same report? Thanks in advance...
Last edited by ddenton; 10-12-2007 at 12:50 PM.
|