An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
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