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
VMSS Healthcheck - Alerting on Unhealthy Node
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
2 answers
Sort by: Most helpful
-
-
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
}