Table: oci_core_network_load_balancer - Query OCI Core Network Load Balancers using SQL
A Network Load Balancer in Oracle Cloud Infrastructure (OCI) is a regional, non-internet-facing, load balancer that distributes traffic within a virtual cloud network (VCN). It uses a load balancing algorithm and health check policy to distribute traffic among backend servers. The Network Load Balancer is designed to handle volatile traffic patterns and millions of flows, with the ability to scale in real time, without pre-warming.
Table Usage Guide
The oci_core_network_load_balancer
table provides insights into Network Load Balancers within Oracle Cloud Infrastructure (OCI) Core services. As a Network Administrator, you can explore load balancer-specific details through this table, including configurations, backend sets, and associated metadata. Utilize it to uncover information about load balancers, such as their health check policies, backend sets, and the distribution of traffic among backend servers.
Examples
Basic info
Explore which network load balancers are currently active in your OCI core network. This can help you assess their health status and identify any that may have been recently created or modified.
select display_name, id, subnet_id, lifecycle_state as state, health_status, time_createdfrom oci_core_network_load_balancer;
select display_name, id, subnet_id, lifecycle_state as state, health_status, time_createdfrom oci_core_network_load_balancer;
List NLBs assigns with public IP address
Discover the segments that are assigned with public IP addresses within your network load balancer, allowing you to identify those that are not private. This can be beneficial for understanding your network's exposure and managing security risks.
select display_name, id, is_privatefrom oci_core_network_load_balancerwhere not is_private;
select display_name, id, is_privatefrom oci_core_network_load_balancerwhere not is_private;
List critical NLBs
Analyze the health status of your network load balancers to identify those in a critical state. This information could be vital in troubleshooting network issues, ensuring data flow efficiency, and maintaining overall system performance.
select display_name, id, network_load_balancer_health -> 'status' as health_statusfrom oci_core_network_load_balancerwhere network_load_balancer_health ->> 'status' = 'CRITICAL';
select display_name, id, json_extract(network_load_balancer_health, '$.status') as health_statusfrom oci_core_network_load_balancerwhere json_extract(network_load_balancer_health, '$.status') = 'CRITICAL';
Query examples
Schema for oci_core_network_load_balancer
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
compartment_id | text | = | The OCID of the compartment in Tenant in which the resource is located. |
defined_tags | jsonb | Defined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources. | |
display_name | text | = | A user-friendly name. Does not have to be unique. |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | The OCID of the network load balancer. |
is_preserve_source_destination | boolean | When enabled, the skipSourceDestinationCheck parameter is automatically enabled on the load balancer VNIC. | |
is_private | boolean | Whether the network load balancer has a virtual cloud network-local (private) IP address. | |
lifecycle_details | text | A message describing the current state in more detail. | |
lifecycle_state | text | = | The current state of the network load balancer. |
listeners | jsonb | Listeners associated with the network load balancer. | |
network_load_balancer_health | jsonb | The overall health status of the network load balancer. | |
network_security_group_ids | jsonb | An array of network security groups OCIDs. | |
region | text | The OCI region in which the resource is located. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
subnet_id | text | The subnet in which the network load balancer is spawned OCIDs. | |
system_tags | jsonb | System tags for resource. System tags can be viewed by users, but can only be created by the system. | |
tags | jsonb | A map of tags for the resource. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The OCID of the Tenant in which the resource is located. |
tenant_name | text | The name of the Tenant in which the resource is located. | |
time_created | timestamp with time zone | The date and time the network load balancer was created. | |
time_updated | timestamp with time zone | The date and time the network load balancer was created. | |
title | text | Title 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)" -- oci
You can pass the configuration to the command with the --config
argument:
steampipe_export_oci --config '<your_config>' oci_core_network_load_balancer