24

We have a load balanced set in Azure for our web application, which load balances port 80 and 443 between two VMs. We have used the default tcp probe. Is there a way to get the current status of the probe for the load balancer from Azure?

I know I could just check each individual machines and do a probe myself, but I want to know if we could see what Azure sees for each machine.

madaboutcode
  • 2,137
  • 1
  • 16
  • 23

4 Answers4

3

Well as of 2018-06-05 this feature is not available in the Azure Portal. Today you have to configure "Diagnostic Logs" for the Load Balancer. If you choose the "Storage Account" option a JSON file is created with records like below

        {
         "time": "2018-06-05T08:50:04.2266987Z",
         "systemId": "XXXXXXXX-XXXX-XXXX-XXXX-d81b04ac33df",
         "category": "LoadBalancerProbeHealthStatus",
         "resourceId": "/SUBSCRIPTIONS/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX/RESOURCEGROUPS/TEST-INT/PROVIDERS/MICROSOFT.NETWORK/LOADBALANCERS/TEST-LB",
         "operationName": "LoadBalancerProbeHealthStatus",
         "properties": {"publicIpAddress":"XXX.XXX.XXX.XXX","port":8080,"totalDipCount":2,"dipDownCount":0,"healthPercentage":100.000000}
    }
    ,
    {
         "time": "2018-06-05T08:50:09.2415410Z",
         "systemId": "XXXXXXXX-XXXX-XXXX-XXXX-d81b04ac33df",
         "category": "LoadBalancerProbeHealthStatus",
         "resourceId": "/SUBSCRIPTIONS/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX/RESOURCEGROUPS/TEST-INT/PROVIDERS/MICROSOFT.NETWORK/LOADBALANCERS/TEST-LB",
         "operationName": "LoadBalancerProbeHealthStatus",
         "properties": {"publicIpAddress":"XXX.XXX.XXX.XXX","port":8080,"totalDipCount":2,"dipDownCount":1,"healthPercentage":50.000000}
    }

"Log Analytics" suggested by Eric is not mandatory but can be used to analyze these LB logs.

Shinva
  • 1,899
  • 18
  • 25
3

There's an easy solution for this now; not sure when it was added to Azure, but here you go:

  1. Click on the Load Balancer from within the Azure portal
  2. Under Monitoring, click on Insights.

You should see something like this:

Cropped image of load balancer topology and health

Hopefully your health checks will look healthier than the ones in this image!

Eric Hirst
  • 1,111
  • 15
  • 31
  • 1
    Thank you. It doesn't appear clearly when pointing to a scale set but the information is more or less available when viewing the detailed metrics, under "Frontend & Backend Availability" then "Health Probe Status by Backend IP Address". Anyway, those charts are slow to refresh, this is very annoying and rather disappointing not to have a quick and efficient way to get the information. – Phil Nov 14 '22 at 16:22
1

you could use 'Log Analytics' to see current status for health probe. Below has more details and step-by-step.

https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-monitor-log

  • 1
    Thanks, but there is a lot of overhead in this approach (storage account, event hub, or log analysts). There really should be a way of querying the status of the probes directly. – Adrian May 22 '18 at 23:27
1

you can check https://learn.microsoft.com/en-us/rest/api/load-balancer/loadbalancerprobes, click on GET and then Try it. It will need you to login with your Azure credentials and put the LB name, RG and Probe on LB which you want to check. fill the details and it will give you the response code if the probes are healthy or not.

Similarly you can use https://learn.microsoft.com/en-us/rest/api/load-balancer/loadbalancers/get to get all the details of a particular LB.