Forum Discussion

Srini1987's avatar
Srini1987
Copper Contributor
Jul 03, 2020
Solved

KQL query to check the v-net peering status

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 .
  • pazdedav's avatar
    Jul 30, 2020

    Hi 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
     
    The peeringState column should show you the status.

Resources