Home > Software design >  Get logs from the load balancer
Get logs from the load balancer

Time:04-06

I have a strange situation where sometimes a request hits an ingress and sometimes hit another ingress. I know because it comes with a different SSL certificate, and when it happens, there is no log on the ingress.

Is there some way to debug this? Get the logs from the load balancer and see what happens, and which route it takes?

CodePudding user response:

You need to enable the Load balancing logging using this steps.

  1. Go to the Load balancing page in the Cloud Console.
  2. Click the name of your load balancer.
  3. Click Edit edit.
  4. Click Backend Configuration.
  5. Select Create a backend service.
  6. Complete the required backend service fields.
  7. Click Enable logging.
  8. Set a Sample rate fraction. You can set a rate to 0.0 through 1.0 (default).
  9. Click Update to finish editing the backend service.
  10. Click Update to finish editing the load balancer.

To view logs

  1. On Console, Go to Logs Exporer
  2. Select GCE Forwarding Rule on Log Fields
  3. Click on log time stamp to view log details.

For more and complete guide you can refer on this page.

Health Checks

Cloud Load Balancing

  • Related