Viewing Azure Site to Site VPN Logs in Log Analytics

Published On: 2021-11-15By:

Recently I needed to view the logs from an Azure Site to Site VPN to see why it wasn’t working as expected. When Azure Site to Site VPNs aren’t working as expected the GUI falls apart quickly for troubleshooting.

Log Analytics is where this problem gets solved. Log Analytics is going to allow you to see basically everything that the Azure Network Gateway is doing. Setting the feed up to Log Analytics isn’t as straightforward as it could be, but it is documented in this post.

In order to view the data, open the Azure Network Gateway in the Azure Portal and find the “Logs” option under “Monitoring” on the menu on the left. This will open the Log Analytics query editor. Cancel out of the sample queries that it gives you access to.

The following query will show you the messages that you are receiving from the IKE Diagnostics.

AzureDiagnostics
| where TimeGenerated > ago(24h)
| where Category == “IKEDiagnosticLog”
| project TimeGenerated, Resource, Message
| order by TimeGenerated desc

The following query will show you the messages that are being logged by the site-to-site VPN Tunnel itself.

AzureDiagnostics
| where TimeGenerated > ago(24h)
| where Category == “TunnelDiagnosticLog”
| project TimeGenerated, Resource, stateChangeReason_s
| order by TimeGenerated desc

With the information provided from these queries you should be able to troubleshoot just about any VPN issue that you are seeing when setting up the Azure Site to Site VPN.

Denny

Contact the Author | Contact DCAC

Leave a Reply

Video

Globally Recognized Expertise

As Microsoft MVP’s and Partners as well as VMware experts, we are summoned by companies all over the world to fine-tune and problem-solve the most difficult architecture, infrastructure and network challenges.

And sometimes we’re asked to share what we did, at events like Microsoft’s PASS Summit 2015.

Awards & Certifications

Microsoft Partner   Denny Cherry & Associates Consulting LLC BBB Business Review    Microsoft MVP    Microsoft Certified Master VMWare vExpert
INC 5000 Award for 2020    American Business Award 2021 Gold    American Business Award 2021 Bronze    FT Americas’ Fastest Growing Companies 2021   INC 5000 Award for 2020    American Business Awards People's Choice    American Business Awards Gold Award    American Business Awards Silver Award
FT Americas’ Fastest Growing Companies 2020       Best Full-Service Cloud Technology Consulting Company       Insights Sccess Award    Technology Headlines Award
Share via
Copy link