Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Compute Engine health check: compute.googleapis.com/healthChecks not available in LOGS EXPLORER

Compute Engine health check: compute.googleapis.com/healthChecks not available in Google Cloud LOGS EXPLORER

When I am in my TEST-project and I go to LOGS EXPLORER and then in the ALL LOG NAMES pulldown I enter "compute", I see these two items appear under COMPUTE ENGINE:
   healthchecks
    compute.googleapis.com/healthChecks
    logName="projects/oversightmd-test/logs/compute.googleapis.com%2Fhealthchecks"

  shielded_vm_integrity
    compute.googleapis.com/shielded_vm_integrity
    logName="projects/oversightmd-test/logs/compute.googleapis.com%2Fshielded_vm_integrity"

But when I am in my PROD-project, I do not see those two items, all I see is shielded_vm_intgrity.
I need the compute.googleapis.com/healthChecks item, why is healthchecks not showing up in PROD-project?

In both PROD and TEST project I have an IAM roles of OWNER andLOGGING ADMIN.

Screenshot from 2025-02-20 10-15-36.png

 

It looks like logging is enabled in both prod and test projects:

$ gcloud compute health-checks list --project myproject-prod
NAME REGION PROTOCOL
https-healthcheck-443 HTTPS

$ gcloud compute health-checks list --project myproject-test
NAME REGION PROTOCOL
https-healthcheck-443 HTTPS

$ gcloud compute health-checks describe https-healthcheck-443 --project myproject-test
httpsHealthCheck:
kind: compute#healthCheck
logConfig:
enable: true
name: https-healthcheck-443
selfLink: https://www.googleapis.com/compute/v1/projects/myproject-test/global/healthChecks/https-healthcheck-...

$ gcloud compute health-checks describe https-healthcheck-443 --project myproject-prod
httpsHealthCheck:
kind: compute#healthCheck
logConfig:
enable: true
name: https-healthcheck-443
selfLink: https://www.googleapis.com/compute/v1/projects/myproject-prod/global/healthChecks/https-healthcheck-...

 

0 1 308
1 REPLY 1

Hi @tacoma50,

Welcome to Google Cloud Community!

If Compute Engine health check logs (compute.googleapis.com/healthChecks) are not available in Logs Explorer, here is a basic step-by-step troubleshooting guide for you to follow.

  1. Health Check Logging is not enabled by default in Compute Engine, as successful health checks are not logged unless explicitly configured. Additionally, logging settings may vary between TEST and PROD, meaning health check logging might not be enabled in the production environment.

Check Log Router Settings in PROD:

Go to Logging Logs Router in the PROD-project.

Ensure no exclusions are blocking compute.googleapis.com/healthChecks.

Check Backend Service Logging (If Using Load Balancer):

If your health checks are associated with a load balancer, check:

Network Services → Load Balancing → Select Backend Service → Edit → Enable Logging

  1. Health check logs may be stored under a different resource type and may not appear under compute.googleapis.com/healthChecks. Instead, they could be logged under a different category.

Try searching in Logs Explorer with:

resource.type=("gce_instance" OR "http_load_balancer")

logName:("compute.googleapis.com/healthChecks" OR "loadbalancing.googleapis.com/https_requests")

  1. Logs may not be retained or the wrong time range might be selected. Standard logs have a default retention of 30 days, so older logs may have expired. Additionally, ensure that the selected time range in Logs Explorer includes the period when the health checks failed.

Adjust the time range in Logs Explorer to "Last 7 days" or "Custom range".

Ensure logs are not older than 30 days.

  1. If firewall rules are blocking health check requests, they may not reach the backend, preventing logs from being generated.

Ensure firewall rules allow health check traffic, and check if logs are recorded under VPC Flow Logs (resource.type="gce_subnetwork").
gcloud compute firewall-rules list --filter="name~'health-check'"

  1. IAM permissions are unlikely to be the issue, as you have OWNER and LOGGING ADMIN roles. However, ensure that you are viewing the correct project in Logs Explorer.

It's also a good idea to reach out to Google Cloud Support for further guidance and assistance in reviewing your project setup.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.