Tracking Cost of Data Transfer on VPN Gateway

Handian Sudianto 7,471 Reputation points
2026-09-18T11:44:32.8233333+00:00

Hello,

If we have conenction from onprem to the azure thru site to site conenction then we only pay for data come out from azure to the onprem and data in from onprem to the azure is not billable?

How we can know how much data in and data out every day?

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.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 132.9K Reputation points MVP Volunteer Moderator
    2026-09-18T17:20:23.0933333+00:00

    Hi @Handian Sudianto ,

    to get the metrics related to an Azure VPG Gateway please take a look here: Monitor Azure VPN Gateway

    There are metrics named TunnelIngressBytes and TunnelEgressBytes -> Azure VPN Gateway monitoring data reference - Category: Traffic

    It should be possible to sum/filter on a day timespan with the LogAnalytics and KQL queries to get the numbers.

    This query I haven't tested but it should give an idea how to start:

    AzureMetrics
    | where TimeGenerated >= ago(30d)
    | where ResourceProvider == "MICROSOFT.NETWORK"
    | where _ResourceId has "virtualNetworkGateways"
    | where MetricName in ("TunnelIngressBytes", "TunnelEgressBytes")
    | extend Day = startofday(TimeGenerated)
    | summarize TotalBytes = sum(Total) by Day, MetricName, Resource
    | project Day, 
              Resource,
              Direction = iif(MetricName == "TunnelIngressBytes", "Inbound (Ingress)", "Outbound (Egress)"), 
              DataTransferred_GB = round(TotalBytes / (1024 * 1024 * 1024), 2)
    | order by Day desc, Resource asc
    

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-09-18T11:44:44.9166667+00:00

    Yes.

    For Azure VPN Gateway site-to-site traffic:

    • Inbound traffic to Azure from on-premises isn't charged.
    • Outbound traffic from Azure to the on-premises VPN device is charged at the Internet egress data transfer rate.
    • If traffic is between virtual networks in different regions, pricing is based on the region.
    • If traffic is only between virtual networks in the same region, there are no data costs.
    • Separate from data transfer, the VPN gateway itself also has an hourly compute cost based on the gateway SKU.

    For the second part, the provided material does not describe a supported way to view daily inbound and outbound data totals for a VPN Gateway.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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