LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-31-2011, 11:03 AM   #1
Mustafa^Qasim
Member
 
Registered: Dec 2005
Location: Lahore, PK
Distribution: Fedora 14
Posts: 105

Rep: Reputation: 16
Process Tomcat logs in AWSTAT


Hi,

I'm using AWSTAT to process Apache logs and it works fine. Now, I need to process Tomcat logs. I have updated the log format to combined in server.xml and rebooted tomcat but still AWSTAT isn't able to process.

Quote:
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 /usr/local/awstats/logresolvemerge.pl /usr/local/apache/logs/tomcat_logs_* | 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:
111.22.33.44 - - [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):
update users set user_id = 'ghost001', last_goodtry_date = '2011-10-31 05:10:05', curr_goodtry_date = '2011-10-31 05:10:05' where user_id ='ghost001'
Here's the part from server.xml which shows tomcat logs are in combined format

Quote:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="combined" resolveHosts="false"/>
 
Old 11-02-2011, 04:54 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Have a look here to see how to configure "apache style" for tomcat logs.

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirecting Apache/Tomcat Logs to rsyslog without writing to disk.... elorson Linux - Software 1 05-28-2011 11:56 PM
[SOLVED] Awstat is dropping all records Mustafa^Qasim Linux - Newbie 5 04-19-2011 07:50 AM
problem with installing awstat ashraflinux1@gmail.com Linux - Server 2 01-08-2010 09:28 AM
Awstat installation issue time_trapper Linux - Software 3 04-01-2008 09:32 PM
awstat question yongitz Linux - Software 0 11-02-2006 04:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration