2

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?

Denis
  • 71
  • 3
  • As best practice here on Stack Overflow, if this or any answer has solved your question please consider [accepting it](https://meta.stackexchange.com/q/5234/179419) by clicking the check-mark. This indicates to the wider community that you've found a solution and gives some reputation to both the answerer and yourself. Another option is to [upvote the answer](https://stackoverflow.com/help/someone-answers) if you feel it is useful for you. There is no obligation to do this. – Hector Martinez Rodriguez Aug 24 '22 at 02:31

1 Answers1

0

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