LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2015, 09:14 AM   #1
ggrein
LQ Newbie
 
Registered: Mar 2015
Posts: 11

Rep: Reputation: Disabled
Monitoring tomcat6 access log with logwatch


I want to monitor tomcat access.log and catalina.out using logwatch.
There are many tutorials on how to implement new log file groups but I couldn't find any example for setting up a filter in /etc/logwatch/scripts/services/ for monitoring the tomcat logs.
Any help is appreciated.
Thanks.
 
Old 04-30-2015, 03:21 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,360
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
First of all I wouldn't monitor files like catalina.out itself, as it gets rewritten each Tomcat restart, but instead use Rsyslogd or equivalent. make it read catalina.out as input file and output it to syslog or a custom log plus you'll get syslog time stamps as well. As far as creating a custom Logwatch filter that's quite easy. If you're using a custom log file location like catalina.out then specify a log file in /usr/share/logwatch/logfiles/ and a service in /usr/share/logwatch/services/ (just copy one existing file as template and modify it). While you're testing run 'logwatch --service tomcat --detail Med --output stdout --debug High' to check if your filters work.
 
Old 05-04-2015, 05:17 AM   #3
ggrein
LQ Newbie
 
Registered: Mar 2015
Posts: 11

Original Poster
Rep: Reputation: Disabled
Specifying a service in /usr/share/logwatch/services/ is the challenge for me. Even if copying an existing one I'm not sure how to modify them. They are written in PEARL I guess and I'm not familiar with PEARL.
That's why I asked for some sample code.
 
  


Reply

Tags
logwatch, tomcat6


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
restricting spesific project out side web access in tomcat6 ramesh14 Linux - Software 2 06-05-2011 01:48 AM
logwatch report Connections (secure-log) Begin pumkum Linux - Security 1 02-14-2009 05:36 AM
Tracking log messages with Logwatch cxiii Fedora 11 02-19-2008 10:11 AM
yum.log & logwatch on centos 4.4 hank43 Linux - Software 1 12-17-2006 09:23 PM
Getting logwatch to include a log GUIPenguin Linux - General 1 03-27-2005 11:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration