SOLVED

How to Extract "Load balancing type" from Log Analytics or Resource Explorer

Copper Contributor

Hi,

 

I'm trying to get the value of "Load balancing type" (Public/Private) as shown in the Properties blade under a Load-Balancer via KQL from either Resource Explorer or from a table available within Log Analytics Workspace. 

 

It seems this property might not be exposed by MS?

 

 

J

2 Replies
best response confirmed by JoVuon (Copper Contributor)
Solution

@JoVuon 

 

this property is not exposed explicitly, but you can infer the LB type by looking at the Frontend IP Configurations and determine if its Public or Internal by checking if it has a Public IP or not. The Az Resource Graph query below makes it clearer, I guess:

 

resources
| where type =~ 'Microsoft.Network/loadBalancers'
| mvexpand FrontendIPs = properties.frontendIPConfigurations
| extend loadBalancerType = iif(isempty(FrontendIPs.properties.publicIPAddress),"Internal","Public"), skuName=tostring(sku.name)
| summarize by id, name, skuName, location, loadBalancerType, resourceGroup, subscriptionId

 

 

Hi @hspinto,

This will work. Thanks for that.

J
1 best response

Accepted Solutions
best response confirmed by JoVuon (Copper Contributor)
Solution

@JoVuon 

 

this property is not exposed explicitly, but you can infer the LB type by looking at the Frontend IP Configurations and determine if its Public or Internal by checking if it has a Public IP or not. The Az Resource Graph query below makes it clearer, I guess:

 

resources
| where type =~ 'Microsoft.Network/loadBalancers'
| mvexpand FrontendIPs = properties.frontendIPConfigurations
| extend loadBalancerType = iif(isempty(FrontendIPs.properties.publicIPAddress),"Internal","Public"), skuName=tostring(sku.name)
| summarize by id, name, skuName, location, loadBalancerType, resourceGroup, subscriptionId

 

 

View solution in original post