steampipe plugin install azure

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,
etag
from
azure_lb_rule;
select
id,
name,
type,
provisioning_state,
etag
from
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_state
from
azure_lb_rule
where
provisioning_state = 'Failed';
select
id,
name,
type,
provisioning_state
from
azure_lb_rule
where
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_minutes
from
azure_lb_rule
order by
idle_timeout_in_minutes;
select
id,
name,
type,
idle_timeout_in_minutes
from
azure_lb_rule
order by
idle_timeout_in_minutes;

Schema for azure_lb_rule

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
backend_address_pool_idtextA reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
backend_address_poolsjsonbAn array of references to pool of DIPs.
backend_portbigintThe port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables 'Any Port'.
cloud_environmenttextThe Azure Cloud Environment.
disable_outbound_snatbooleanConfigures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
enable_floating_ipbooleanConfigures 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_resetbooleanReceive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
etagtextA unique read-only string that changes whenever the resource is updated.
frontend_ip_configuration_idtextA reference to frontend IP addresses.
frontend_portbigintThe 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'.
idtextThe resource ID.
idle_timeout_in_minutesbigintThe 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_nametext=The friendly name that identifies the load balancer.
load_distributiontextThe load distribution policy for this rule. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'.
nametext=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_idtextThe reference to the load balancer probe used by the load balancing rule.
protocoltextThe reference to the transport protocol used by the load balancing rule. Possible values include: 'UDP', 'TCP', 'All'.
provisioning_statetextThe provisioning state of the load balancing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'.
resource_grouptext=The resource group which holds this resource.
subscription_idtextThe Azure Subscription ID in which the resource is located.
titletextTitle of the resource.
typetextType 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