简体   繁体   中英

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. 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). 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:

  • /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.

If the logging agent does not report any errors, make sure you are using the right filters in the Logs Viewer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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