0

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?

Pavan
  • 1
  • 1
  • 1
    Have you installed the [monitoring agent](https://cloud.google.com/monitoring/agent/)? After [installing](https://cloud.google.com/monitoring/agent/install-agent) the monitoring agent, you might need to configure Monitoring to monitor Apache. The [instructions](https://cloud.google.com/monitoring/agent/plugins/apache#configuring) mentioned in the help center article would help you to configure the Apache plugin on your instance. I hope this helps. – Digil Nov 28 '18 at 18:01

1 Answers1

0

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.

Igor Peshansky
  • 727
  • 4
  • 12