steampipe plugin install fastly

Table: fastly_pool - Query Fastly Pools using SQL

Fastly Pools are a key component in Fastly's Content Delivery Network (CDN) services. They allow users to group backend servers together, which Fastly then uses to balance load and route traffic. Pools are also used to manage failover scenarios, where traffic can be rerouted to backup servers if the primary servers become unavailable.

Table Usage Guide

The fastly_pool table provides insights into Fastly Pools within the Fastly CDN services. As a DevOps engineer or site reliability engineer, explore pool-specific details through this table, including configuration settings, health status, and associated backend servers. Utilize it to understand the load balancing and failover strategies of your Fastly CDN, and to ensure optimal performance and reliability of your web services.

Examples

Basic info

Gain insights into the health and configuration of your Fastly service pools, including their creation date, version, and connection timeout settings. This can be useful in monitoring and maintaining optimal service performance.

select
id,
name,
connect_timeout,
created_at,
healthcheck,
service_id,
service_version
from
fastly_pool;
select
id,
name,
connect_timeout,
created_at,
healthcheck,
service_id,
service_version
from
fastly_pool;

List pools that are not deleted

Explore which service pools are still active and not marked for deletion. This can assist in managing resources and maintaining an efficient service structure.

select
id,
name,
connect_timeout,
created_at,
healthcheck,
service_id,
service_version
from
fastly_pool
where
deleted_at is null;
select
id,
name,
connect_timeout,
created_at,
healthcheck,
service_id,
service_version
from
fastly_pool
where
deleted_at is null;

List random pools

Analyze the settings to understand the configuration and health status of various service pools, particularly those of the 'random' type. This can help in managing resources effectively, identifying potential issues, and optimizing service performance.

select
id,
name,
connect_timeout,
created_at,
healthcheck,
service_id,
service_version
from
fastly_pool
where
pool_type = 'random';
select
id,
name,
connect_timeout,
created_at,
healthcheck,
service_id,
service_version
from
fastly_pool
where
pool_type = 'random';

List pools of the active versions

Analyze the settings to understand the active versions of your service by identifying their associated pools. This information can help optimize your service's performance and resource allocation.

select
id,
name,
connect_timeout,
p.created_at,
healthcheck,
p.service_id,
service_version
from
fastly_pool as p,
fastly_service_version as v
where
p.service_id = v.service_id
and p.service_version = v.number
and v.active;
select
p.id,
p.name,
p.connect_timeout,
p.created_at,
p.healthcheck,
p.service_id,
p.service_version
from
fastly_pool as p,
fastly_service_version as v
where
p.service_id = v.service_id
and p.service_version = v.number
and v.active = 1;

Schema for fastly_pool

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
commenttextA freeform descriptive note.
connect_timeoutbigintHow long to wait for a timeout in milliseconds.
created_attimestamp with time zoneTimestamp (UTC) of when the pool was created.
deleted_attimestamp with time zoneTimestamp (UTC) of when the pool was deleted.
first_byte_timeoutbigintHow long to wait for the first byte in milliseconds. Optional.
healthchecktextName of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools.
idtextAlphanumeric string identifying a Pool.
max_conn_defaultbigintMaximum number of connections.
max_tls_versiontextMaximum allowed TLS version on connections to this server. Optional.
min_tls_versiontextMinimum allowed TLS version on connections to this server. Optional.
nametext=Name for the Pool.
override_hosttextThe hostname to override the Host header. Defaults to null meaning no override of the Host header will occur.
pool_typetextWhat type of load balance group to use: random, hash, client.
quorumbigintPercentage of capacity (0-100) that needs to be operationally available for a pool to be considered up.
request_conditiontextCondition which, if met, will select this configuration during a request. Optional.
service_idtextAlphanumeric string identifying the service.
service_versionbigintInteger identifying a service version.
shieldtextSelected POP to serve as a shield for the servers. Defaults to null meaning no origin shielding if not set.
titletextTitle of the resource.
tls_ca_certtextA secure certificate to authenticate a server with. Must be in PEM format.
tls_cert_hostnametextThe hostname used to verify a server's certificate. It can either be the Common Name (CN) or a Subject Alternative Name (SAN).
tls_check_certbooleanBe strict on checking TLS certs. Optional.
tls_cipherstextList of OpenSSL ciphers.
tls_client_certtextThe client certificate used to make authenticated requests. Must be in PEM format.
tls_client_keytextThe client private key used to make authenticated requests. Must be in PEM format.
tls_sni_hostnametextSNI hostname. Optional.
updated_attimestamp with time zoneTimestamp (UTC) of when the pool was updated.
use_tlsbooleanWhether to use TLS.

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)" -- fastly

You can pass the configuration to the command with the --config argument:

steampipe_export_fastly --config '<your_config>' fastly_pool