2

I'm using GCP's an unmanaged HTTP external load balacer, and I have several Nginx servers running on its backend.

I wanted to check the logs for changes in the health status of the Nginx servers, but could not find a way to do so.

First, I enabled logging for the health check assigned to the backend service. Then, I stopped the service of one Nginx server to test it. Then I selected GCE Health Check from the Resource Type in the Logs Explorer, but only logs related to the creation, update, and deletion of the health check itself appeared.

Next, I enabled logging for the backend service and did the same experiment. However, similarly, only logs related to the creation, update, and deletion of the backend service itself appeared.

I have three questions:

  1. Doesn't the logging of the health check log the changes in the health status of the monitored service?
  2. Doesn't the logging of backend services log the health status changes of the instances belonging to the backend?
  3. How can I check when each Nginx server became unhealthy and when it became healthy in the log?
Tsutomu
  • 4,848
  • 1
  • 46
  • 68
  • 1
    Does [this page](https://cloud.google.com/load-balancing/docs/health-check-logging) help you? – guillaume blaquiere Jan 24 '21 at 16:56
  • Thank you, guillaume blaquiere. I've already read that page, but I read it again and found something I missed. It says that health check logs are indexed by instance group or network endpoint group. So I tried selecting "GCE Instance Group" in the Log Explorer, but couldn't find any record of the health transitions. – Tsutomu Jan 25 '21 at 01:31
  • 1
    Sorry, I was wrong. When I selected "GCE Instance Group" in the Log Explorer, I found an entry called healthCheckProbeResult. – Tsutomu Jan 25 '21 at 01:47
  • Have you solved your issue? – Serhii Rohoza Jan 25 '21 at 09:10
  • 1
    I had made two mistakes: one was that I had not selected "GCE Instance Group" in Log Explorer. The other was that I had not enabled logging for the health check. When I asked the question, I had enabled logging, but when I took guillaume's advice and looked at the Log Explorer again, logging was disabled. That's why I commented once that the logs were not showing up, but then I realized my mistake and corrected it. – Tsutomu Jan 25 '21 at 10:26
  • Could you post an answer? – Serhii Rohoza Feb 02 '21 at 12:56

0 Answers0