VMSS Healthcheck - Alerting on Unhealthy Node

Jim Musana 6 Reputation points
2021-09-16T21:35:01.84+00:00

Hello,

I have a Virtual Machine Scale Set in Azure that is configured with a Health Check . I noticed today one of the VMs failed the health check and was marked unhealthy as expected. However I am looking for a way to be alerted via email when the VMSS determines that a node has become unhealthy. I've looked at the metrics section to see if I can create an alert based on a metric but there is no one for "unhealthy" node.

Any ideas on how I can pull this off in Azure are appreciated

Thanks

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,799 questions
Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
347 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Jim Musana 6 Reputation points
    2021-10-12T17:36:29+00:00

    Hello @bharathn-msft , I ended up using the UnHealthyHostCount alert in Azure Monitor which seems to be working fine and meeting the requirement. Thanks for your help on this

    1 person found this answer helpful.

  2. Muralidar Sripadha 1 Reputation point Microsoft Employee
    2022-08-14T02:32:46.853+00:00

    I have two instances in VMSS, one is reporting unhealthy, how to check the reason? I am using terraform code to deploy the instances.

    resource "azurerm_lb_probe" "lbprobe" {
    //resource_group_name = azurerm_resource_group.mediarg.name
    loadbalancer_id = azurerm_lb.mediaapplb.id
    name = "http-probe"
    protocol = "Http"
    request_path = "/"
    port = 80
    }

    resource "azurerm_lb_rule" "applbrule" {
    //resource_group_name = azurerm_resource_group.mediarg.name
    loadbalancer_id = azurerm_lb.mediaapplb.id
    name = "webtrafficrule"
    protocol = "Tcp"
    frontend_port = 80
    backend_port = 80
    backend_address_pool_ids = [azurerm_lb_backend_address_pool.lbappbp.id]
    frontend_ip_configuration_name = "frontpubip"
    probe_id = azurerm_lb_probe.lbprobe.id
    }

    0 comments No comments