Viewing high-level information about clusters in Memorystore for Redis Cluster is essential to obtain a comprehensive snapshot of the cluster's state, configuration, and connectivity.
The following are sample use cases for viewing summary information about clusters:
- Retrieve connection endpoints: retrieve the discovery endpoint, which consists of an IP address and port number.
- Verify custom configurations: view configuration parameters that a user
applies to a cluster. For example, you can obtain the value that a user sets
for the
maxmemory-policyparameter. - Check information about nodes and shards: obtain information about the nodes and shards associated with a cluster. This includes the number of shards, the node type, and the number of replicas that each shard has.
- Confirm data resiliency settings: verify active persistence modes for Redis Database (RDB) snapshots and Append-Only File (AOF) log files, as well as the status of whether a cluster is protected from accidental deletion.
View summary information about a cluster
You can view summary information about a cluster by using either the Google Cloud console or the gcloud CLI.
Console
In the Google Cloud console, go to the Memorystore for Redis Cluster page.
Click the ID of a cluster about which you want to view summary information.
gcloud
To view summary information about a cluster, use the
gcloud redis clusters describe
command:
gcloud redis clusters describe CLUSTER_ID \ --region=REGION_ID
Make the following replacements:
- CLUSTER_ID: the ID of the cluster about which you want to view summary information
- REGION_ID: the region where the cluster is located
For example:
gcloud redis clusters describe my-cluster \ --region=us-central1
View zones for a cluster
You can view which zones a cluster uses by using either the Google Cloud console or the gcloud CLI.
Console
The Google Cloud console displays a tooltip, which lists the zones that your cluster uses. If the cluster is running in a two-zone deployment, then the tooltip indicates this deployment type. For more information, see Two-zone deployments for high availability and resilience.
To view which zones a cluster uses, do the following:
In the Google Cloud console, go to the Memorystore for Redis Cluster page.
Hold your mouse pointer over the number of zones for the cluster.
gcloud
To view which zones a cluster uses, use the gcloud redis clusters describe command with the
--format="yaml(zoneDistributionConfig)" flag.
gcloud redis clusters describe CLUSTER_ID \ --region=REGION_ID \ --format="yaml(zoneDistributionConfig)"
Make the following replacements:
- CLUSTER_ID: the ID of the cluster
- REGION_ID: the region where the cluster is located
REST
To view the zones that a cluster uses, use the following REST command.
Before using any of the request data, make the following replacements:
- PROJECT_ID: the ID of the project that contains the cluster
- REGION_ID: the region where the cluster is located
- CLUSTER_ID: the ID of the cluster
HTTP method and URL:
GET https://redis.googleapis.com/v1/projects/PROJECT_ID/locations/REGION_ID/clusters/CLUSTER_ID
To send your request, expand one of these options:
You should receive a JSON response similar to the following:
{
"name": "projects/PROJECT_ID/locations/REGION_ID/clusters/CLUSTER_ID",
"state": "ACTIVE",
"shardCount": SHARD_COUNT,
"zoneDistributionConfig": {
"mode": "MULTI_ZONE",
"zones": [
"ZONE_1",
"ZONE_2",
"ZONE_3"
],
"activeZones": [
"ZONE_1",
"ZONE_2",
"ZONE_3"
]
}
}