Azure VPN logs - for how long are they kept and how to query?

Daniel Sotreanu 85 Reputation points
2023-06-20T07:22:13.9333333+00:00

Hello,

I need to troubleshoot a connection error between a Palo Alto equipment and Azure VPN.

The issue happened 6 months ago. Any chance I can find some info? And how?

Many thanks,

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,803 questions
0 comments No comments
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 50,096 Reputation points Microsoft Employee Moderator
    2023-06-20T13:36:33.9733333+00:00

    Hello @Daniel Sotreanu ,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand that you would like to know for how long the VPN logs are retained and how to query them.

    Retention period settings are configured in Diagnostic settings tab of Azure monitor in case you are sending the logs to a storage account as below:

    User's image

    If the logs are being sent to log analytics, then the retention period is set/changed at the workspace/table level:

    https://learn.microsoft.com/en-us/azure/azure-monitor/logs/data-retention-archive?tabs=portal-1%2Cportal-2#configure-the-default-workspace-retention-policy

    Regarding your question on how to query the VPN logs, you can refer the below article which lists some of the sample queries for the VPN logs:

    https://learn.microsoft.com/en-us/azure/vpn-gateway/troubleshoot-vpn-with-azure-diagnostics#GatewayDiagnosticLog

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AirGordon 7,150 Reputation points
    2023-06-20T07:38:46.3866667+00:00

    It actually depends on how you've configured logging in Azure.

    If you check the Diagnostic Settings for the Gateway, you're able to specify which logging categories to capture and where to send the logs. ref: https://learn.microsoft.com/en-us/azure/vpn-gateway/troubleshoot-vpn-with-azure-diagnostics

    Even after configuring logging you also might find that the retention period on your logs has lapsed and they have been deleted. Again, this is user configurable - so you'll need to inspect the logging solution that was configured.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.