Table: azure_lb_rule - Query Azure Load Balancer Rules using SQL
An Azure Load Balancer Rule is a rule within Microsoft Azure that determines how network traffic is distributed among service endpoints in a load balancer. It provides a way to direct traffic based on a variety of parameters, including port, protocol, and IP address. These rules play a crucial role in ensuring the smooth operation and scalability of applications hosted on Azure.
Table Usage Guide
The azure_lb_rule
table provides insights into the rules defined within Azure Load Balancer. As a network engineer or a system administrator, you can explore rule-specific details through this table, including the load balancing algorithm used, health probe settings, and associated metadata. Utilize it to uncover information about the rules, such as those directing traffic to specific ports or using certain protocols, and to verify their configurations.
Examples
Basic info
Explore the configuration and status of Azure load balancer rules. This aids in understanding the type and provisioning state of each rule, which can help in managing and troubleshooting your Azure load balancer setup.
select id, name, type, provisioning_state, etagfrom azure_lb_rule;
select id, name, type, provisioning_state, etagfrom azure_lb_rule;
List failed load balancer rules
Discover the segments that have unsuccessful load balancer rules, allowing you to focus on rectifying these specific areas to improve network traffic distribution.
select id, name, type, provisioning_statefrom azure_lb_rulewhere provisioning_state = 'Failed';
select id, name, type, provisioning_statefrom azure_lb_rulewhere provisioning_state = 'Failed';
List load balancer rules order by idle timeout
Assess the elements within your load balancer rules to understand which ones have been idle for the longest time. This could help optimize resource allocation and improve system performance.
select id, name, type, idle_timeout_in_minutesfrom azure_lb_ruleorder by idle_timeout_in_minutes;
select id, name, type, idle_timeout_in_minutesfrom azure_lb_ruleorder by idle_timeout_in_minutes;
Schema for azure_lb_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_address_pool_id | text | A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. | |
backend_address_pools | jsonb | An array of references to pool of DIPs. | |
backend_port | bigint | The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables 'Any Port'. | |
cloud_environment | text | The Azure Cloud Environment. | |
disable_outbound_snat | boolean | Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. | |
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_id | text | 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 are between 0 and 65534. Note that value 0 enables 'Any Port'. | |
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. |
load_distribution | text | The load distribution policy for this rule. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'. | |
name | text | = | The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource. |
probe_id | text | The reference to the load balancer probe used by the load balancing rule. | |
protocol | text | The reference to the transport protocol used by the load balancing rule. Possible values include: 'UDP', 'TCP', 'All'. | |
provisioning_state | text | The provisioning state of the load balancing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. | |
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_rule