steampipe plugin install fly

Table: fly_redis_database - Query Fly Redis Databases using SQL

Fly Redis Database is a service within Fly that allows you to manage and interact with Redis databases. It provides a centralized way to set up and manage databases for various applications, including web applications, microservices, and more. Fly Redis Database helps you stay informed about the health and performance of your databases and take appropriate actions when predefined conditions are met.

Table Usage Guide

The fly_redis_database table provides insights into Redis databases within Fly. As a Database Administrator, explore database-specific details through this table, including configuration, status, and associated metadata. Utilize it to uncover information about databases, such as those with specific configurations, the status of databases, and the verification of configuration details.

Examples

Basic info

Explore which Redis databases are currently in use, along with their associated hostnames and public URLs. This can be useful in understanding the layout of your resources and identifying the primary region for each database.

select
name,
hostname,
public_url,
primary_region
from
fly_redis_database;
select
name,
hostname,
public_url,
primary_region
from
fly_redis_database;

List databases with no replica

Discover the segments that consist of databases without replicas. This is useful for identifying potential single points of failure in your system and ensuring data redundancy.

select
name,
hostname,
public_url,
primary_region
from
fly_redis_database
where
read_regions is null
or jsonb_array_length(read_regions) = 0;
select
name,
hostname,
public_url,
primary_region
from
fly_redis_database
where
read_regions is null
or json_array_length(read_regions) = 0;

List databases with object eviction enabled

Explore which Fly Redis databases have the object eviction feature enabled. This query is useful for identifying databases that may require additional memory management due to potential data loss.

select
name,
hostname,
public_url,
primary_region
from
fly_redis_database
where
(options -> 'eviction') :: boolean;
select
name,
hostname,
public_url,
primary_region
from
fly_redis_database
where
json_extract(options, '$.eviction') = 1;

List large databases

Explore which databases are large, specifically those with a maximum data size of 3 GB. This can be useful for identifying databases that may require more storage or management due to their size.

select
name,
hostname,
public_url,
primary_region
from
fly_redis_database
where
add_on_plan ->> 'maxDataSize' = '3 GB';
select
name,
hostname,
public_url,
primary_region
from
fly_redis_database
where
json_extract(add_on_plan, '$.maxDataSize') = '3 GB';

Schema for fly_redis_database

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
add_on_planjsonbSpecifies the add-on plan.
add_on_plan_nametextSpecifies the database plan.
hostnametextThe database hostname.
idtext=A unique identifier of the database.
nametextThe name of the database.
optionsjsonbThe database options.
organization_idtextSpecifies the organization.
passwordtextThe database password.
primary_regiontextThe primary region where the database is located.
private_ipinetSpecifies the private IP address of the database.
public_urltextThe public URL of the database.
read_regionsjsonbA list of database replica regions.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.

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

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

steampipe_export_fly --config '<your_config>' fly_redis_database