Table: azure_lb_nat_rule - Query Azure Load Balancer NAT Rules using SQL
Azure Load Balancer NAT Rules are part of the Azure Load Balancer service, which ensures high availability and network performance to your applications. NAT Rules are responsible for translating the public IP address and port of a packet to a private IP address and port. They play a crucial role in managing network traffic and routing.
Table Usage Guide
The azure_lb_nat_rule
table provides insights into the NAT rules within Azure Load Balancer. As a network engineer, explore NAT rule-specific details through this table, including the associated load balancer, protocol, and ports. Utilize it to uncover information about NAT rules, such as their configuration, associated resources, and the effectiveness of the network routing.
Examples
Basic info
Explore which Azure Load Balancer NAT rules are currently in use and assess their provisioning states to ensure optimal performance and resource allocation. This query is particularly useful in managing and troubleshooting network traffic within your Azure environment.
select id, name, type, provisioning_state, etagfrom azure_lb_nat_rule;
select id, name, type, provisioning_state, etagfrom azure_lb_nat_rule;
List failed load balancer nat rules
Explore instances where load balancer NAT rules have failed in Azure. This helps in pinpointing areas of concern and aids in troubleshooting the issues for smooth operation.
select id, name, type, provisioning_statefrom azure_lb_nat_rulewhere provisioning_state = 'Failed';
select id, name, type, provisioning_statefrom azure_lb_nat_rulewhere provisioning_state = 'Failed';
List load balancer nat rules order by idle timeout
Analyze the settings to understand the order of NAT rules based on their idle timeout within a load balancer. This can be useful in optimizing system performance and managing network traffic more efficiently.
select id, name, type, idle_timeout_in_minutesfrom azure_lb_nat_ruleorder by idle_timeout_in_minutes;
select id, name, type, idle_timeout_in_minutesfrom azure_lb_nat_ruleorder by idle_timeout_in_minutes;
Schema for azure_lb_nat_rule
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
backend_ip_configuration | jsonb | A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. | |
backend_port | bigint | The port used for the internal endpoint. Acceptable values range from 1 to 65535. | |
cloud_environment | text | The Azure Cloud Environment. | |
enable_floating_ip | boolean | Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. | |
enable_tcp_reset | boolean | Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. | |
etag | text | A unique read-only string that changes whenever the resource is updated. | |
frontend_ip_configuration | jsonb | A reference to frontend IP addresses. | |
frontend_port | bigint | The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. | |
id | text | The resource ID. | |
idle_timeout_in_minutes | bigint | The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. | |
load_balancer_name | text | = | The friendly name that identifies the load balancer. |
name | text | = | The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource. |
protocol | text | The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'. | |
provisioning_state | text | The provisioning state of the inbound NAT rule resource. | |
resource_group | text | = | The resource group which holds this resource. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
subscription_id | text | =, !=, ~~, ~~*, !~~, !~~* | The Azure Subscription ID in which the resource is located. |
title | text | Title of the resource. | |
type | text | Type of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- azure
You can pass the configuration to the command with the --config
argument:
steampipe_export_azure --config '<your_config>' azure_lb_nat_rule