Redirecting Apache/Tomcat Logs to rsyslog without writing to disk....
For internal security reasons I need to prevent our tomcat logs from writing to the webserver local disk. We set up a separate logging server with rsyslog and need to pipe the log data to it.
I am trying to work out how to configure tomcat to send all log data to the logging server via the rsyslog client (running locally) via a named pipe. We are on CentOS 5.6, Tomcat 6 and rsyslog 5.8.1. I need to know: 1) do we use the default logging library or log4j 2) where is this configured in the tomcat config 3) is there any code that would need to be written to achieve this Thanks, Eric |
Thats how I currently have it set: apache writes to a regular log file, sends a copy to rsyslog, rsyslog sends it to remote server.
How to set: In vhosts directive: Code:
CustomLog |/usr/bin/apache_syslog syslog Code:
#!/usr/bin/perl Of course this requires syslog defined in apache, or use common/combined. Enjoy! |
All times are GMT -5. The time now is 01:38 PM. |