turbot/scaleway
steampipe plugin install scaleway

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,
project
from
scaleway_rdb_instance;
select
name,
id,
status,
engine,
region,
project
from
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_count
from
scaleway_rdb_instance
group by
engine;
select
engine,
count(id) as instance_count
from
scaleway_rdb_instance
group 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,
project
from
scaleway_rdb_instance
where
extract(
day
from
current_timestamp - created_at
) > 90;
select
name,
id,
status,
engine,
julianday('now') - julianday(created_at) as age,
region,
project
from
scaleway_rdb_instance
where
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,
project
from
scaleway_rdb_instance
where
(backup_schedule ->> 'disabled') :: boolean;
select
name,
id,
status,
json_extract(backup_schedule, '$.disabled') as automatic_backup,
region,
project
from
scaleway_rdb_instance
where
json_extract(backup_schedule, '$.disabled') = 'true';

Schema for scaleway_rdb_instance

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
backup_schedulejsonbDescribes the backup schedule of the instance.
created_attimestamp with time zoneThe time when the instance was created.
endpointjsonbDescribes the endpoint of the instance.
enginetextThe database engine of the database.
idtext=An unique identifier of the instance.
init_settingsjsonbA list of engine settings to be set at database initialization.
is_has_clusterbooleanIndicates whether High-Availability is enabled, or not.
nametext=The user-defined name of the instance.
node_typetextThe node type of the instance.
organizationtextThe ID of the organization where the instance resides.
projecttextThe ID of the project where the instance resides.
read_replicasjsonbA list of read replicas of the instance.
regiontext=Specifies the region where the instance resides.
settingsjsonbA list of advanced settings of the instance.
statustextThe current state of the instance.
tagsjsonbA list of tags associated with the instance.
titletextTitle of the resource.
volumejsonbDescribes 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