简体   繁体   English

Stackdriver上的Apache访问日志

[英]Apache-access logs on Stackdriver

I'm trying to setup apache-access logs on my Google Cloud VM instance to see all url level traffic coming to the site. 我正在尝试在我的Google Cloud VM实例上设置apache-access日志,以查看进入该网站的所有url级流量。 I have setup fluentd and gave necessary access control, but I'm unable to see the logs. 我已经熟练设置并给予了必要的访问控制,但是我看不到日志。

Can someone help me out on this? 有人可以帮我吗?

You need to install the Stackdriver Logging agent package (which is more than just fluentd). 您需要安装Stackdriver Logging代理程序包 (不仅仅是流利的)。 The Linux logging agent package pulls in the google-fluentd-catch-all-config package, which configures the agent to look for Apache access logs in the following locations: Linux日志记录代理程序软件包google-fluentd-catch-all-configgoogle-fluentd-catch-all-config软件包,该软件包将代理程序配置为在以下位置查找Apache访问日志:

  • /var/log/apache*/access.log
  • /var/log/apache*/access_log
  • /var/log/httpd/access.log
  • /var/log/httpd/access_log

On Windows, or if your Linux Apache is configured to log in a different location, the logging agent won't be able to ingest the logs by default — you would have to configure it to look in your custom location. 在Windows上,或者如果您的Linux Apache配置为登录到其他位置,则默认情况下,日志记录代理将无法提取日志-您必须将其配置为在自定义位置查找。

If the logging agent does not report any errors, make sure you are using the right filters in the Logs Viewer. 如果日志记录代理未报告任何错误,请确保在“日志查看器”使用了正确的过滤器。

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

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