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_regionfrom fly_redis_database;
select name, hostname, public_url, primary_regionfrom 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_regionfrom fly_redis_databasewhere read_regions is null or jsonb_array_length(read_regions) = 0;
select name, hostname, public_url, primary_regionfrom fly_redis_databasewhere 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_regionfrom fly_redis_databasewhere (options -> 'eviction') :: boolean;
select name, hostname, public_url, primary_regionfrom fly_redis_databasewhere 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_regionfrom fly_redis_databasewhere add_on_plan ->> 'maxDataSize' = '3 GB';
select name, hostname, public_url, primary_regionfrom fly_redis_databasewhere json_extract(add_on_plan, '$.maxDataSize') = '3 GB';
Schema for fly_redis_database
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
add_on_plan | jsonb | Specifies the add-on plan. | |
add_on_plan_name | text | Specifies the database plan. | |
hostname | text | The database hostname. | |
id | text | = | A unique identifier of the database. |
name | text | The name of the database. | |
options | jsonb | The database options. | |
organization_id | text | Specifies the organization. | |
password | text | The database password. | |
primary_region | text | The primary region where the database is located. | |
private_ip | inet | Specifies the private IP address of the database. | |
public_url | text | The public URL of the database. | |
read_regions | jsonb | A list of database replica regions. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe 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