Bonjour,

J'ai besoin de tracer sous tomcat standalone les logs entrant.
Pour cela j'ai mis dans mes webapp les "Valve", les fichiers sont bien déposés dans /var/log/tomcat .

Par contre l'integration avec logwatch 5.2.2 du script http://blogs.sun.com/taz/entry/logwa...tomcat_traffic
ne fonctionne pas .

J'ai positionne
* Le script de service tomcat sous /etc/log.d/scripts/services/tomcat

* Le fichier de conf du service tomcat /etc/log.d/conf/logfiles/tomcat.conf avec
LogFile = tomcat/*access_log*

* Le fichier de conf de logwatch /etc/log.d/conf/logwatch.conf a Service =All et Detail=High

Mes fichiers de logs existe bien, mais le mail que je recois ne mentionne pas la partie tomcat ?

Je seche un peu, une idee ?
Merci d'avance
Philippe

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
 
logwatch.conf
########################################################
# This was written and is maintained by:
#    Kirk Bauer <kirk@kaybee.org>
#
# Please send all comments, suggestions, bug reports,
#    etc, to kirk@kaybee.org.
#
########################################################
 
# NOTE:
#   All these options are the defaults if you run logwatch with no
#   command-line arguments.  You can override all of these on the
#   command-line. 
 
# You can put comments anywhere you want to.  They are effective for the
# rest of the line.
 
# this is in the format of <name> = <value>.  Whitespace at the beginning
# and end of the lines is removed.  Whitespace before and after the = sign
# is removed.  Everything is case *insensitive*.
 
# Yes = True  = On  = 1
# No  = False = Off = 0
 
# Default Log Directory
# All log-files are assumed to be given relative to this directory.
LogDir = /var/log
 
# You can override the default temp directory (/tmp) here
TmpDir = /tmp
 
# Default person to mail reports to.  Can be a local account or a
# complete email address.
MailTo = root
 
# If set to 'Yes', the report will be sent to stdout instead of being
# mailed to above person.
Print = No
 
# Leave this to 'Yes' if you have the mktemp program and it supports
# the '-d' option.  Some older version of mktemp on pre-RH7.X did not
# support this option, so set this to no in that case and Logwatch will
# use internal temp directory creation that is (hopefully) just as secure
UseMkTemp = Yes
 
#
#	Some systems have mktemp in a different place
#
MkTemp = /bin/mktemp
 
# if set, the results will be saved in <filename> instead of mailed
# or displayed.
#Save = /tmp/logwatch
 
# Use archives?  If set to 'Yes', the archives of logfiles
# (i.e. /var/log/messages.1 or /var/log/messages.1.gz) will
# be searched in addition to the /var/log/messages file.
# This usually will not do much if your range is set to just
# 'Yesterday' or 'Today'... it is probably best used with
# Archives = Yes
# Range = All
 
# The default time range for the report...
# The current choices are All, Today, Yesterday
Range = yesterday
 
# The default detail level for the report.
# This can either be Low, Med, High or a number.
# Low = 0
# Med = 5
# High = 10
#Detail = Low
#Detail = Med
Detail = High
 
 
# The 'Service' option expects either the name of a filter
# (in /etc/log.d/scripts/services/*) or 'All'.
# The default service(s) to report on.  This should be left as All for
# most people.  
Service = All
# You can also disable certain services (when specifying all)
#Service = -zz-fortune
# If you only cared about FTP messages, you could use these 2 lines
# instead of the above:
#Service = ftpd-messages   # Processes ftpd messages in /var/log/messages
#Service = ftpd-xferlog    # Processes ftpd messages in /var/log/xferlog
# Maybe you only wanted reports on PAM messages, then you would use:
#Service = pam_pwdb     # PAM_pwdb messages - usually quite a bit
#Service = pam          # General PAM messages... usually not many
 
# You can also choose to use the 'LogFile' option.  This will cause
# logwatch to only analyze that one logfile.. for example:
#LogFile = messages
# will process /var/log/messages.  This will run all the filters that 
# process that logfile.  This option is probably not too useful to
# most people.  Setting 'Service' to 'All' above analyizes all LogFiles
# anyways...
 
#
# some systems have different locations for mailers
#
mailer = /bin/mail
 
#
# With this option set to 'Yes', only log entries for this particular host
# (as returned by 'hostname' command) will be processed.  The hostname
# can also be overridden on the commandline (with --hostname option).  This
# can allow a log host to process only its own logs, or Logwatch can be
# run once per host included in the logfiles. 
#
# The default is to report on all log entries, regardless of its source host.
# Note that some logfiles do not include host information and will not be
# influenced by this setting.
#
#HostLimit = Yes
 
 
tomcat.conf
########################################################
#   Define log file group for tomcat (httpd)
########################################################
 
# What actual file?  Defaults to LogPath if not absolute path....
#LogFile = httpd/*access_log
#LogFile = apache/*access.log.1
#LogFile = apache/*access.log
#LogFile = apache2/*access.log.1
#LogFile = apache2/*access.log
#LogFile = apache-ssl/*access.log.1
#LogFile = apache-ssl/*access.log
 
#added for tomcat
#LogFile = localhost_access_log*
#LogFile = logs/localhost_access_log*
LogFile = tomcat/*access_log*
 
 
# If the archives are searched, here is one or more line
# (optionally containing wildcards) that tell where they are...
#If you use a "-" in naming add that as well -mgt
Archive = archiv/httpd/*access_log.*
Archive = httpd/*access_log.*
Archive = apache/*access.log.*.gz
Archive = apache2/*access.log.*.gz
Archive = apache-ssl/*access.log.*.gz
 
 
# Expand the repeats (actually just removes them now)
*ExpandRepeats
 
 
# Keep only the lines in the proper date range...
*ApplyhttpDate
 
# vi: shiftwidth=3 tabstop=3 et