Table: scaleway_rdb_instance - Query Scaleway RDB Instances using SQL
Scaleway RDB Instances are a part of Scaleway's managed database services. These services provide a scalable, reliable, and easy to use database solution. They are fully managed by Scaleway, ensuring automatic updates, backups, and scalability without any manual intervention.
Table Usage Guide
The scaleway_rdb_instance
table provides insights into RDB instances within Scaleway's managed database services. As a database administrator or a DevOps engineer, you can explore instance-specific details through this table, including instance status, region, and other related data. Utilize it to manage and monitor your RDB instances effectively, ensuring optimal performance and security.
Examples
Basic info
Explore which Scaleway RDB instances are currently active or inactive, their associated engines, and the regions they're located in, all within the context of a specific project. This is beneficial for maintaining an overview of your database instances and their status, especially in larger projects.
select name, id, status, engine, region, projectfrom scaleway_rdb_instance;
select name, id, status, engine, region, projectfrom scaleway_rdb_instance;
Count instances by engine type
Analyze the distribution of instances based on their engine types to understand the usage patterns and preferences in your Scaleway RDB instances. This can help in making informed decisions for resource allocation and optimization.
select engine, count(id) as instance_countfrom scaleway_rdb_instancegroup by engine;
select engine, count(id) as instance_countfrom scaleway_rdb_instancegroup by engine;
List instances older than 90 days
Determine the areas in which Scaleway RDB instances have been running for over 90 days. This can be useful for identifying potential cost-saving opportunities by shutting down or resizing long-running instances.
select name, id, status, engine, extract( day from current_timestamp - created_at ) as age, region, projectfrom scaleway_rdb_instancewhere extract( day from current_timestamp - created_at ) > 90;
select name, id, status, engine, julianday('now') - julianday(created_at) as age, region, projectfrom scaleway_rdb_instancewhere julianday('now') - julianday(created_at) > 90;
List instances with automatic backup disabled
Identify instances where automatic backup has been disabled, allowing you to assess risk and take necessary action to ensure data safety across different projects and regions. This is particularly useful in maintaining data integrity and preventing potential data loss.
select name, id, status, backup_schedule ->> 'disabled' as automatic_backup, region, projectfrom scaleway_rdb_instancewhere (backup_schedule ->> 'disabled') :: boolean;
select name, id, status, json_extract(backup_schedule, '$.disabled') as automatic_backup, region, projectfrom scaleway_rdb_instancewhere json_extract(backup_schedule, '$.disabled') = 'true';
Schema for scaleway_rdb_instance
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
backup_schedule | jsonb | Describes the backup schedule of the instance. | |
created_at | timestamp with time zone | The time when the instance was created. | |
endpoint | jsonb | Describes the endpoint of the instance. | |
engine | text | The database engine of the database. | |
id | text | = | An unique identifier of the instance. |
init_settings | jsonb | A list of engine settings to be set at database initialization. | |
is_has_cluster | boolean | Indicates whether High-Availability is enabled, or not. | |
name | text | = | The user-defined name of the instance. |
node_type | text | The node type of the instance. | |
organization | text | The ID of the organization where the instance resides. | |
project | text | The ID of the project where the instance resides. | |
read_replicas | jsonb | A list of read replicas of the instance. | |
region | text | = | Specifies the region where the instance resides. |
settings | jsonb | A list of advanced settings of the instance. | |
status | text | The current state of the instance. | |
tags | jsonb | A list of tags associated with the instance. | |
title | text | Title of the resource. | |
volume | jsonb | Describes the volume attached with the instance. |
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)" -- scaleway
You can pass the configuration to the command with the --config
argument:
steampipe_export_scaleway --config '<your_config>' scaleway_rdb_instance