Azure Workbook for S2S connection state

Cloudy 206 Reputation points


I'm trying to create a workbook which can display in a circle or something like that, the current state of an IPSEC tunnel connection (disconnect vs connected).
So i tried that on the Virtual Network Gateway:
| where TimeGenerated > ago(5m)
| where Category == "TunnelDiagnosticLog" and (status_s == "Connected")
| project TimeGenerated, Resource , status_s, remoteIP_s, stateChangeReason_s
| summarize countstatus=count() by status_s, TimeGenerated

The issue is that as the Connect / Disconnect events are not logged in real time in AzureDiagnostics, ....i'm not able to achieve the goal.
The perfect goal is to have a "red circle when disconnected, and a green one when connected".

any help would be appreciated, i'm not sure that's possible.

Thanks at all !

Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,419 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,227 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Cloudy 206 Reputation points

    Dear @ChaitanyaNaykodi-MSFT ,

    I found another workaround by using Resource Graph Explorer :

    | where type == "" and properties.connectionType=="IPsec"
    | extend connectionTest = case(properties.connectionStatus == "Connected", "OK",
    properties.connectionStatus == "NotConnected", "NOK",
    "No result")

    With that query i'm able to get the result i want :)

    Thanks for your help

    0 comments No comments