Jul 03 2020
01:22 PM
- last edited on
Apr 08 2022
10:32 AM
by
TechCommunityAP
Jul 03 2020
01:22 PM
- last edited on
Apr 08 2022
10:32 AM
by
TechCommunityAP
Hi Friends,
i am surprised there is no way to monitor the status of vnet peering using azure monitor.
Can any one help to find KQL query to check the v-net peering status .
Jul 06 2020 10:50 AM
VNet peering is a SDN solution for connecting two different VNets. You don't have devices/appliances implementing the peering. Having Azure Monitor metrics for peering status would be almost similar to having metrics for subnet-to-subnet connectivity.
However, you can implement yourself a Connection monitor, with two VM endpoints (one in each side of the peering). See more info on that.
Jul 30 2020 06:50 AM
SolutionHi @Srini1987 ,
You could try using Azure Resource Graph (also KQL-based) and this query:
resources
| where type =~ 'Microsoft.network/virtualNetworks'
| extend peerings=array_length(properties.virtualNetworkPeerings)
| mv-expand peering=properties.virtualNetworkPeerings
| where isnotempty(peerings)
| project networkId = id, VNetName = name, peeringState=tostring(peering.properties.peeringState), peering
Nov 03 2021 02:22 AM
Do you know if it is possible to make an alert through that query that if one of the peerings is disconnected an email is sent?
Thanks!
Nov 06 2021 05:25 AM
Nov 08 2021 04:52 AM
Jul 30 2020 06:50 AM
SolutionHi @Srini1987 ,
You could try using Azure Resource Graph (also KQL-based) and this query:
resources
| where type =~ 'Microsoft.network/virtualNetworks'
| extend peerings=array_length(properties.virtualNetworkPeerings)
| mv-expand peering=properties.virtualNetworkPeerings
| where isnotempty(peerings)
| project networkId = id, VNetName = name, peeringState=tostring(peering.properties.peeringState), peering