title: How can I detect SNAT port exhaustion on Azure using Datadog metrics?
body: <p>Here's a <a href="https://docs.datadoghq.com/integrations/azure_load_balancer/" rel="nofollow noreferrer">list</a> of DataDog metrics of Azure Load Balancer that are available to use. It seems like</p>
  <pre><code>azure.network_loadbalancers.allocated_snat_ports (count) - Total number of SNAT ports allocated within time period,
  azure.network_loadbalancers.snat_connection_count (count) - Total number of new SNAT connections created within time period,
  azure.network_loadbalancers.used_snat_ports (count) - Total number of SNAT ports used within time period
  </code></pre>
  <p>are the most releveant.</p>
  <blockquote>
  <p>When SNAT port resources are exhausted, outbound flows fail. You could observe failing outbound connections or are advised by support that you're exhausting SNAT ports.</p>
  </blockquote>
  <blockquote>
  <p>Simply seeing failed connections does not confirm SNAT exhaustion. Seeing the failed connections was a clue we were having an issue but there is no way to confirm SNAT exhaustion w/o a ticket to Microsoft it turns out.</p>
  </blockquote>