简体   繁体   English

Apache httpd访问日志或tomcat访问日志

[英]Apache httpd access logs or tomcat access logs

In our web application, which is deployed on tomcat server inside apache web server, we need to plot some metrics like count of specific API hits and latency on these APIs. 在部署在apache Web服务器内的tomcat服务器上的Web应用程序中,我们需要绘制一些指标,例如特定API命中数和这些API的延迟。 In order to achieve it, we need to parse log files using something like grok. 为了实现它,我们需要使用grok之类的文件来解析日志文件。

Now, my main concern is understanding difference between apache access log and tomcat access log and choosing one of them. 现在,我主要关心的是了解apache访问日志和tomcat访问日志之间的区别,并选择其中之一。 Any incoming request is first logged into apache access log and then tomcat access log. 任何传入的请求都会先登录到apache访问日志,然后再登录tomcat访问日志。 Then what is the difference between them, if there is single tomcat server deployed inside this apache web server. 如果在此apache Web服务器中部署了一个单独的tomcat服务器,那么它们之间有什么区别。 And which is the better candidate? 哪个是更好的候选人?

You really only need one of them although there isn't a 100% overlap (eg tomcat won't tell you the number of bytes received). 尽管没有100%的重叠,您实际上只需要其中之一(例如,tomcat不会告诉您接收到的字节数)。

Here's the tomcat access log docs . 这是tomcat访问日志文档

And here's the httpd access log docs . 是httpd访问日志文档

You might have issues reading the logs depending on the user account you run tomcat under (which wants to read the logs) and the user account you run apache httpd under. 根据运行tomcat的用户帐户(要读取日志)和运行apache httpd的用户帐户,您可能在读取日志时遇到问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM