|
| 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