Table: gcp_redis_cluster - Query Google Cloud Platform Memorystore Redis Clusters using SQL
Google Cloud Platform's Memorystore Redis Cluster service is a fully managed service that powers applications with low-latency data access. It provides secure and highly available Redis clusters while Google handles all the underlying infrastructure for you. Redis clusters are ideal for use cases such as caching, session storage, gaming leaderboards, real-time analytics, and queueing.
Table Usage Guide
The gcp_redis_cluster
table provides insights into Memorystore Redis Clusters within Google Cloud Platform. As a DevOps engineer, you can explore cluster-specific details through this table, including the cluster's ID, name, region, and current status. Utilize it to monitor and manage your Redis clusters, ensuring they are configured correctly and running efficiently.
Examples
Basic info
Explore which Google Cloud Platform (GCP) Memorystore Redis clusters have been created, along with their creation times, locations, memory sizes, and IP addresses. This is useful for gaining insights into your GCP Memorystore Redis clusters' configurations and understanding how your resources are being utilized.
select name, create_time, location, size_gb, precise_size_gb, psc_connections [ 0 ] ->> 'address' as addressfrom gcp_redis_cluster;
select name, create_time, location, size_gb, precise_size_gb, psc_connections [ 0 ] -> 'address' as addressfrom gcp_redis_cluster;
List clusters that have IAM authorization enabled
Discover the segments that have enabled IAM authorization to enhance security measures and maintain data privacy within your GCP Memorystore Redis clusters. This can be particularly useful in identifying potential vulnerabilities and ensuring compliance with best practices.
select name, create_time, location, psc_connections [ 0 ] ->> 'address' as addressfrom gcp_redis_clusterwhere authorization_mode = 1;
select name, create_time, location, psc_connections [ 0 ] -> 'address' as addressfrom gcp_redis_clusterwhere authorization_mode = 1;
List clusters created in the last 7 days
Discover the segments that have been newly added within the past week. This is beneficial in monitoring the growth and changes in your database over a short period.
select name, create_time, location, psc_connections [ 0 ] ->> 'address' as addressfrom gcp_redis_clusterwhere create_time >= current_timestamp - interval '7 days';
select name, create_time, location, psc_connections [ 0 ] -> 'address' as addressfrom gcp_redis_clusterwhere create_time >= datetime('now', '-7 days');
Get node details of each cluster
Gain insights into the specific details of each cluster node in your GCP Memorystore Redis database, such as the creation time and location. This can be particularly useful for troubleshooting or for optimizing your database's performance and security.
select name, create_time, location, node_type, size_gb, replica_count, shard_countfrom gcp_redis_clusterwhere name = 'cluster-test' and location = 'europe-west9';
select name, create_time, location, node_type, size_gb, replica_count, shard_countfrom gcp_redis_clusterwhere name = 'cluster-test' and location = 'europe-west9';
List clusters that have in-transit encryption disabled
Discover the segments where in-transit encryption is disabled in clusters. This is particularly useful in identifying potential security risks and ensuring data protection standards are maintained.
select name, create_time, location, psc_connections [ 0 ] ->> 'address' as addressfrom gcp_redis_clusterwhere transit_encryption_mode != 2;
select name, create_time, location, psc_connections [ 0 ] -> 'address' as addressfrom gcp_redis_clusterwhere transit_encryption_mode != 2;
Schema for gcp_redis_cluster
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
authorization_mode | bigint | The authorization mode of the Redis cluster. | |
create_time | timestamp with time zone | The timestamp associated with the cluster creation request. | |
cross_cluster_replication_config | jsonb | Cross cluster replication config. | |
deletion_protection_enabled | jsonb | The delete operation will fail when the value is set to true. | |
discovery_endpoints | jsonb | Endpoints created on each given network, for Redis clients to connect to the cluster. | |
location | text | = | The GCP multi-region, region, or zone in which the resource is located. |
name | text | = | Unique name of the resource in this scope including project and location. |
node_type | bigint | The type of Redis nodes in the cluster that determines the underlying machine-type. | |
persistence_config | jsonb | Persistence config (RDB, AOF) for the cluster. | |
precise_size_gb | double precision | Precise value of redis memory size in GB for the entire cluster. | |
project | text | =, !=, ~~, ~~*, !~~, !~~* | The GCP Project in which the resource is located. |
psc_configs | jsonb | Each PscConfig configures the consumer network where IPs will be designated to the cluster for client access through Private Service Connect Automation. | |
psc_connections | jsonb | PSC connections for discovery of the cluster topology and accessing the cluster. | |
redis_configs | jsonb | Key/Value pairs of customer overrides for mutable Redis Configs. | |
replica_count | bigint | The number of replica nodes per shard. | |
shard_count | bigint | Number of shards for the Redis cluster. | |
size_gb | double precision | Redis memory size in GB for the entire cluster rounded up to the next integer. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
state | bigint | The current state of this cluster. | |
state_info | jsonb | Additional information about the current state of the cluster. | |
title | text | Title of the resource. | |
transit_encryption_mode | bigint | The in-transit encryption for the Redis cluster. | |
uid | text | System assigned, unique identifier for the cluster. | |
zone_distribution_config | jsonb | This config will be used to determine how the customer wants us to distribute cluster resources within the region. |
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)" -- gcp
You can pass the configuration to the command with the --config
argument:
steampipe_export_gcp --config '<your_config>' gcp_redis_cluster