question

JimMusana-2709 avatar image
0 Votes"
JimMusana-2709 asked MuralidarSripadha-1608 answered

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

azure-monitorazure-virtual-machines-scale-set
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JimMusana-2709 Welcome to Microsoft Q&A. Our sincere apologies for delay in getting back to this thread.

Trying to better understand the scenario you are looking for, have you enabled the health check within Virtual machine scale set ? and looking to see if we can alert based on this probing health check.


135608-image.png

Additional documentation reference on Using Application Health extension with virtual machine scale sets

Looking forward to hear from you, so that we can help you accordingly. Thank you

0 Votes 0 ·
image.png (37.4 KiB)

@JimMusana-2709 - Checking in to see if you had a chance to review above comment and have further information about the scenario you are looking for, which could help us to guide you accordingly.

0 Votes 0 ·
JimMusana-2709 avatar image
1 Vote"
JimMusana-2709 answered bharathn-msft commented

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JimMusana-2709 - Glad to hear you were able to figure this out and appreciate you taking time to share this resolution for broader community usage. Thank you

0 Votes 0 ·
MuralidarSripadha-1608 avatar image
0 Votes"
MuralidarSripadha-1608 answered

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
}

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.