How to view Google HTTP load balancer access logs without Stackdriver

google-cloud-platformgoogle-compute-enginegoogle-stackdriver

I would like to see GCE HTTP/HTTPS Load Balancer access logs. By default, access logs go to Stackdriver. But we have to exclude the log named “cloud-http-load-balancer” because Stackdriver will start charging on March 31, 2018, and Stackdriver logs are obscenely expensive ($0.50/GiB, and we get many TiB per month so it would be over $10,000/month).

How can we get Cloud Load Balancer access logs, but without Stackdriver? In comparison, AWS allows you to setup ELB to export access logs to S3 for no added charge other than the price of S3 itself.

Best Answer

Log entries excluded from Stackdriver Logging will not appear in the Logs Viewer, logs-based metrics, or Stackdriver Error Reporting. The answer is in the same document you provided, as these future logs can still be exported before they are excluded, using log sinks. You could also use an advance filter to only exclude some of the load balancer logs (as request logs, then you would still be able to see warnings for example)