Skip to content

Commit 0789b9b

Browse files
Onboard to templates, in progress.
1 parent 9a29a15 commit 0789b9b

File tree

5 files changed

+305
-345
lines changed

5 files changed

+305
-345
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,11 @@
625625
"redirect_url": "/previous-versions/azure/mysql/single-server/tutorial-provision-mysql-server-using-azure-resource-manager-templates",
626626
"redirect_document_id": false
627627
},
628+
{
629+
"source_path": "articles/nat-gateway/nat-metrics.md",
630+
"redirect_url": "/azure/nat-gateway/monitor-nat-gateway",
631+
"redirect_document_id": true
632+
},
628633
{
629634
"source_path": "articles/firewall-manager/multiple-public-ip-powershell.md",
630635
"redirect_url": "/previous-versions/azure/firewall-manager/multiple-public-ip-powershell",
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
title: Monitoring data reference for Azure NAT Gateway
3+
description: This article contains important reference material you need when you monitor Azure NAT Gateway by using Azure Monitor.
4+
ms.date: 08/06/2024
5+
ms.custom: horz-monitor
6+
ms.topic: reference
7+
author: asudbring
8+
ms.author: allensu
9+
ms.service: nat-gateway
10+
---
11+
# Azure NAT Gateway monitoring data reference
12+
13+
[!INCLUDE [horz-monitor-ref-intro](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-intro.md)]
14+
15+
See [Monitor Azure NAT Gateway](monitor-monitor-nat-gateway.md) for details on the data you can collect for Azure NAT Gateway and how to use it.
16+
17+
[!INCLUDE [horz-monitor-ref-metrics-intro](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-intro.md)]
18+
19+
### Supported metrics for Microsoft.Network/natgateways
20+
21+
The following table lists the metrics available for the Microsoft.Network/natgateways resource type.
22+
23+
[!INCLUDE [horz-monitor-ref-metrics-tableheader](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-tableheader.md)]
24+
25+
[!INCLUDE [Microsoft.Network/natgateways](~/reusable-content/ce-skilling/azure/includes/azure-monitor/reference/metrics/microsoft-network-natgateways-metrics-include.md)]
26+
27+
> [!NOTE]
28+
> Count aggregation is not recommended for any of the NAT gateway metrics. Count aggregation adds up the number of metric values and not the metric values themselves. Use Total aggregation instead to get the best representation of data values for connection count, bytes, and packets metrics.
29+
>
30+
> Use Average for best represented health data for the datapath availability metric.
31+
>
32+
> For information about aggregation types, see [aggregation types](/azure/azure-monitor/essentials/metrics-aggregation-explained#aggregation-types).
33+
34+
## How to use NAT gateway metrics
35+
36+
The following sections detail how to use each NAT gateway metric to monitor, manage, and troubleshoot your NAT gateway resource.
37+
38+
### Bytes
39+
40+
The **Bytes** metric shows you the amount of data going outbound through NAT gateway and returning inbound in response to an outbound connection.
41+
42+
Use this metric to:
43+
44+
- View the amount of data being processed through NAT gateway to connect outbound or return inbound.
45+
46+
### Datapath availability
47+
48+
The datapath availability metric measures the health of the NAT gateway resource over time. This metric indicates if NAT gateway is available for directing outbound traffic to the internet. This metric is a reflection of the health of the Azure infrastructure.
49+
50+
You can use this metric to:
51+
52+
- Monitor the availability of NAT gateway.
53+
- Investigate the platform where your NAT gateway is deployed and determine if it’s healthy.
54+
- Isolate whether an event is related to your NAT gateway or to the underlying data plane.
55+
56+
Possible reasons for a drop in data path availability include:
57+
58+
- An infrastructure outage.
59+
- There aren't healthy VMs available in your NAT gateway configured subnet. For more information, see the [NAT gateway connectivity troubleshooting guide](/azure/nat-gateway/troubleshoot-nat-connectivity).
60+
61+
### Packets
62+
63+
The packets metric shows you the number of data packets passing through NAT gateway.
64+
65+
Use this metric to:
66+
67+
- Verify that traffic is passing outbound or returning inbound through NAT gateway.
68+
- View the amount of traffic going outbound through NAT gateway or returning inbound.
69+
70+
### Dropped packets
71+
72+
The dropped packets metric shows you the number of data packets dropped by NAT gateway when traffic goes outbound or returns inbound in response to an outbound connection.
73+
74+
Use this metric to:
75+
76+
- Check if periods of dropped packets coincide with periods of failed SNAT connections with the [SNAT Connection Count](#snat-connection-count) metric.
77+
- Help determine if you're experiencing a pattern of failed outbound connections or SNAT port exhaustion.
78+
79+
Possible reasons for dropped packets:
80+
81+
- Outbound connectivity failure can cause packets to drop. Connectivity failure can happen for various reasons. See the [NAT gateway connectivity troubleshooting guide](/azure/nat-gateway/troubleshoot-nat-connectivity) to help you further diagnose.
82+
83+
### SNAT connection count
84+
85+
The SNAT connection count metric shows you the number of new SNAT connections within a specified time frame. This metric can be filtered by **Attempted** and **Failed** connection states. A failed connection volume greater than zero can indicate SNAT port exhaustion.
86+
87+
Use this metric to:
88+
89+
- Evaluate the health of your outbound connections.
90+
- Help diagnose if your NAT gateway is experiencing SNAT port exhaustion.
91+
- Determine if you're experiencing a pattern of failed outbound connections.
92+
93+
### Total SNAT connection count
94+
95+
The **Total SNAT connection count** metric shows you the total number of active SNAT connections passing through NAT gateway.
96+
97+
You can use this metric to:
98+
99+
- Evaluate the volume of connections passing through NAT gateway.
100+
- Determine if you're nearing the connection limit of NAT gateway.
101+
- Help assess if you're experiencing a pattern of failed outbound connections.
102+
103+
Possible reasons for failed connections:
104+
105+
- A pattern of failed connections can happen for various reasons. See the [NAT gateway connectivity troubleshooting guide](/azure/nat-gateway/troubleshoot-nat-connectivity) to help you further diagnose.
106+
107+
>[!NOTE]
108+
> When NAT gateway is attached to a subnet and public IP address, the Azure platform verifies NAT gateway is healthy by conducting health checks. These health checks appear in NAT gateway's SNAT Connection Count metrics. The amount of health check related connections may vary as the health check service is optimized, but is negligible and doesn’t impact NAT gateway’s ability to connect outbound.
109+
110+
[!INCLUDE [horz-monitor-ref-metrics-dimensions-intro](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-dimensions-intro.md)]
111+
112+
[!INCLUDE [horz-monitor-ref-metrics-dimensions](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-metrics-dimensions.md)]
113+
114+
- ConnectionState: Attempted, Failed
115+
- Direction: In, Out
116+
- Protocol: 6 TCP, 17 UDP
117+
118+
[!INCLUDE [horz-monitor-ref-activity-log](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-ref-activity-log.md)]
119+
120+
- [Microsoft.Network resource provider operations](/azure/role-based-access-control/resource-provider-operations#microsoftnetwork)
121+
122+
## Related content
123+
124+
- See [Monitor Azure NAT Gateway](monitor-nat-gateway.md) for a description of monitoring Azure NAT Gateway.
125+
- See [Monitor Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource) for details on monitoring Azure resources.
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
---
2+
title: Monitor Azure NAT Gateway
3+
description: Start here to learn how to monitor Azure NAT Gateway by using the available Azure Monitor metrics and alerts.
4+
ms.date: 08/06/2024
5+
ms.custom: horz-monitor
6+
ms.topic: conceptual
7+
author: asudbring
8+
ms.author: allensu
9+
ms.service: nat-gateway
10+
---
11+
12+
# Monitor [TODO-replace-with-service-name]
13+
14+
[!INCLUDE [horz-monitor-intro](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-intro.md)]
15+
16+
You can use metrics and alerts to monitor, manage, and [troubleshoot](troubleshoot-nat.md) your NAT gateway resource. Azure NAT Gateway provides the following diagnostic capabilities:
17+
18+
- Multi-dimensional metrics and alerts through Azure Monitor: You can use these metrics to monitor and manage your NAT gateway and to assist you in troubleshooting issues.
19+
- Network Insights: Azure Monitor Insights provides you with visual tools to view, monitor, and assist you in diagnosing issues with your NAT gateway resource. Insights provide you with a topological map of your Azure setup and metrics dashboards.
20+
21+
This diagram shows Azure NAT Gateway for outbound to the internet.
22+
23+
:::image type="content" source="./media/nat-gateway-resource/nat-gateway-deployment.png" alt-text="Diagram of a NAT gateway resource with virtual machines.":::
24+
25+
[!INCLUDE [horz-monitor-insights](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-insights.md)] -->
26+
27+
## Network Insights
28+
29+
[Azure Monitor Network Insights](../network-watcher/network-insights-overview.md) allows you to visualize your Azure infrastructure setup and to review all metrics for your NAT gateway resource from a preconfigured metrics dashboard. These visual tools help you diagnose and troubleshoot any issues with your NAT gateway resource.
30+
31+
### View the topology of your Azure architectural setup
32+
33+
To view a topological map of your setup in Azure:
34+
35+
1. From your NAT gateway’s resource page, select **Insights** from the **Monitoring** section.
36+
37+
1. On the landing page for **Insights**, there's a topology map of your NAT gateway setup. This map shows the relationship between the different components of your network (subnets, virtual machines, public IP addresses).
38+
39+
1. Hover over any component in the topology map to view configuration information.
40+
41+
:::image type="content" source="./media/nat-metrics/nat-insights.png" alt-text="Screenshot of the Insights section of NAT gateway.":::
42+
43+
### View all NAT gateway metrics in a dashboard
44+
45+
The metrics dashboard can be used to better understand the performance and health of your NAT gateway resource. The metrics dashboard shows a view of all metrics for NAT gateway on a single page.
46+
47+
- All NAT gateway metrics can be viewed in a dashboard when selecting **Show Metrics Pane**.
48+
49+
:::image type="content" source="./media/nat-metrics/nat-metrics-pane.png" alt-text="Screenshot of the show metrics pane.":::
50+
51+
- A full page view of all NAT gateway metrics can be viewed when selecting **View Detailed Metrics**.
52+
53+
:::image type="content" source="./media/nat-metrics/detailed-metrics.png" alt-text="Screenshot of the view detailed metrics.":::
54+
55+
For more information on what each metric is showing you and how to analyze these metrics, see [How to use NAT gateway metrics](monitor-nat-gateway-reference#how-to-use-nat-gateway-metrics).
56+
57+
[!INCLUDE [horz-monitor-resource-types](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-resource-types.md)]
58+
For more information about the resource types for Azure NAT Gateway, see [Azure NAT Gateway monitoring data reference](monitor-nat-gateway-reference.md).
59+
60+
[!INCLUDE [horz-monitor-data-storage](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-data-storage.md)]
61+
62+
[!INCLUDE [horz-monitor-platform-metrics](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-platform-metrics.md)]
63+
64+
For a list of available metrics for Azure NAT Gateway, see [Azure NAT Gateway monitoring data reference](monitor-nat-gateway-reference.md#metrics).
65+
66+
NAT gateway metrics can be found in the following locations in the Azure portal.
67+
68+
- **Metrics** page under **Monitoring** from a NAT gateway's resource page.
69+
70+
- **Insights** page under **Monitoring** from a NAT gateway's resource page.
71+
72+
:::image type="content" source="./media/nat-metrics/nat-insights-metrics.png" alt-text="Screenshot of the insights and metrics options in NAT gateway overview.":::
73+
74+
- Azure Monitor page under **Metrics**.
75+
76+
:::image type="content" source="./media/nat-metrics/azure-monitor.png" alt-text="Screenshot of the metrics section of Azure Monitor.":::
77+
78+
<!-- ## OPTIONAL [TODO-replace-with-service-name] metrics
79+
If your service uses any non-Azure Monitor based metrics, add the following include and more information.
80+
[!INCLUDE [horz-monitor-custom-metrics](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-non-monitor-metrics.md)] -->
81+
82+
<!-- ## Azure Monitor resource logs -->
83+
84+
[!INCLUDE [horz-monitor-resource-logs](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-resource-logs.md)]
85+
86+
[!INCLUDE [horz-monitor-no-resource-logs](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-no-resource-logs.md)]
87+
88+
[!INCLUDE [horz-monitor-activity-log](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-activity-log.md)]
89+
90+
[!INCLUDE [horz-monitor-analyze-data](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-analyze-data.md)]
91+
92+
[!INCLUDE [horz-monitor-external-tools](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-external-tools.md)]
93+
94+
[!INCLUDE [horz-monitor-kusto-queries](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-kusto-queries.md)]
95+
96+
[!INCLUDE [horz-monitor-alerts](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-alerts.md)]
97+
98+
### Azure NAT Gateway alert rules
99+
100+
You can set alerts for any metric, log entry, or activity log entry listed in the [Azure NAT Gateway monitoring data reference](monitor-nat-gateway-reference.md).
101+
102+
### Alerts for datapath availability degradation
103+
104+
Set up an alert on datapath availability to help you detect issues with the health of NAT gateway.
105+
106+
The recommended guidance is to alert on NAT gateway's datapath availability when it drops below 90% over a 15-minute period. This configuration is indicative of a NAT gateway resource being in a degraded state.
107+
108+
> [!NOTE]
109+
> Aggregation granularity is the period of time over which the datapath availability is measured to determine if it has dropped below the threshold value. Setting the aggregation granularity to less than 5 minutes may trigger false positive alerts that detect noise in the datapath.
110+
111+
### Alerts for SNAT port exhaustion
112+
113+
Set up an alert on the **SNAT connection count** metric to notify you of connection failures on your NAT gateway. A failed connection volume greater than zero can indicate that you reached the connection limit on your NAT gateway or that you hit SNAT port exhaustion. Investigate further to determine the root cause of these failures.
114+
115+
> [!NOTE]
116+
> SNAT port exhaustion on your NAT gateway resource is uncommon. If you see SNAT port exhaustion, check if NAT gateway's idle timeout timer is set higher than the default amount of 4 minutes. A long idle timeout timer setting can cause SNAT ports too be in hold down for longer, which results in exhausting SNAT port inventory sooner. You can also scale your NAT gateway with additional public IPs to increase NAT gateway's overall SNAT port inventory. To troubleshoot these kinds of issues, refer to the [NAT gateway connectivity troubleshooting guide](/azure/nat-gateway/troubleshoot-nat-connectivity#snat-exhaustion-due-to-nat-gateway-configuration).
117+
118+
### Alerts for NAT gateway resource health
119+
120+
[Azure Resource Health](/azure/service-health/overview) provides information on the health state of your NAT gateway resource. The resource health of your NAT gateway is evaluated by measuring the datapath availability of your NAT gateway endpoint. You can set up alerts to notify you when the health state of your NAT gateway resource changes. To learn more about NAT gateway resource health and setting up alerts, see:
121+
122+
- [Azure NAT Gateway Resource Health](/azure/nat-gateway/resource-health)
123+
- [NAT Gateway Resource Health Alerts](/azure/nat-gateway/resource-health#resource-health-alerts)
124+
- [How to create Resource Health Alerts in the Azure portal](/azure/service-health/resource-health-alert-monitor-guide)
125+
126+
[!INCLUDE [horz-monitor-advisor-recommendations](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-advisor-recommendations.md)]
127+
128+
129+
130+
131+
<!-- content still to be integrated:
132+
133+
134+
135+
136+
## Metrics FAQ
137+
138+
### What type of metrics are available for NAT gateway?
139+
140+
The NAT gateway supports [multi-dimensional metrics](/azure/azure-monitor/essentials/data-platform-metrics#multi-dimensional-metrics). You can filter the multi-dimensional metrics by different dimensions to gain greater insight into the provided data. The [SNAT connection count](#snat-connection-count) metric allows you to filter the connections by Attempted and Failed connections, enabling you to distinguish between different types of connections made by the NAT gateway.
141+
142+
Refer to the dimensions column in the [metrics overview](#metrics-overview) table to see which dimensions are available for each NAT gateway metric.
143+
144+
### How do I store NAT gateway metrics long-term?
145+
146+
All [platform metrics are stored](/azure/azure-monitor/essentials/data-platform-metrics#retention-of-metrics) for 93 days. If you require long term access to your NAT gateway metrics data, NAT gateway metrics can be retrieved by using the [metrics REST API](/rest/api/monitor/metrics/list). For more information on how to use the API, see the [Azure monitoring REST API walkthrough](/azure/azure-monitor/essentials/rest-api-walkthrough).
147+
148+
>[!NOTE]
149+
>Diagnostic Settings [doesn’t support the export of multi-dimensional metrics](/azure/azure-monitor/reference/supported-metrics/metrics-index#exporting-platform-metrics-to-other-locations) to another location, such as Azure Storage and Log Analytics.
150+
>
151+
>To retrieve NAT gateway metrics, use the metrics REST API.
152+
153+
### How do I interpret metrics charts?
154+
155+
Refer to [troubleshooting metrics charts](/azure/azure-monitor/essentials/metrics-troubleshoot) if you run into issues with creating, customizing or interpreting charts in Azure metrics explorer.
156+
157+
## Next steps
158+
159+
* Learn about [Azure NAT Gateway](nat-overview.md)
160+
* Learn about [NAT gateway resource](nat-gateway-resource.md)
161+
* Learn about [Azure Monitor](../azure-monitor/overview.md)
162+
* Learn about [troubleshooting NAT gateway resources](troubleshoot-nat.md).
163+
* Learn about [troubleshooting NAT gateway connectivity](/azure/nat-gateway/troubleshoot-nat-connectivity)
164+
165+
-->
166+
167+
168+
## Related content
169+
170+
- See [Azure NAT Gateway monitoring data reference](monitor-nat-gateway-reference.md) for a reference of the metrics, logs, and other important values created for Azure NAT Gateway.
171+
- See [Monitoring Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource) for general details on monitoring Azure resources.

0 commit comments

Comments
 (0)