On 21.02.2020 18:49, Darryl Philip Baker wrote:
On 2/21/20, 11:36 AM, "Christopher Schultz" <ch...@christopherschultz.net> 
wrote:

     -----BEGIN PGP SIGNED MESSAGE-----
     Hash: SHA256
Darryl, On 2/21/20 12:15, Darryl Philip Baker wrote:
     > I have taken over the administration of several Tomcat instances.
     > A number of these are load balanced using an F5 appliance.  The
     > org.apache.catalina.values.AccessLogValve log file is filled with
     > the F5 polls to see if the application is alive. Under almost all
     > circumstances these are useless, I would like to stop logging just
     > these requests.
     Dumb question: why bother removing them?

Not so dumb a question, I have 2 reasons. First when looking at the raw file on 
the server these poles from the load balancers make it hard to find the useful 
entries. The second reason is we use Splunk as a log aggregator. In Splunk it 
is easy to filter these out when looking at the log but having all these almost 
useless messages significantly adds to the activity of the Splunk forwarder on 
these systems.


Apart from everything else (I had a few dumb questions/remarks of my own),
See : http://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Access_Log_Valve
attribute : conditionUnless
So you could use this, along with a Filter which applies only to requests with URI "/MySite/isAlive.jsp" and sets an attribute "junk" for these; and bingo! they would not be logged anymore.

This page even seems to show how you could do that without a Filter, directly in your own "isAlive.jsp" :
https://www.roseindia.net/jsp/requestsetattribute.shtml
(No guarantee though, I'm not really the expert here)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to