GCP LB monitor healthy nodes count

Viewed 33

Google cloud load balancer monitoring dashboard provides number of healthy nodes: enter image description here

Is it any metric / MQL which can be used to create an alert if one node considered as down?

1 Answers

There is no direct metric for the Load Balancer's backends, but what you can do is to create a Monitoring group containing them, and then set up an Uptime check for monitoring and alerting; you can follow these steps to accomplish that:

  1. Tag all the backend instances:
gcloud compute instances add-tags <instance_name> --tags=lb-backend --zone <instance_zone>
  1. Create the monitoring group using Resource Type = gce_instance AND the tag as discriminators: enter image description here

  2. Create the Uptime check and alerting policy for that group: enter image description here

Related