用于 Redis 的 Amazon ElastiCache
ElastiCache for Redis 用户指南 (API 版本 2015-02-02)
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

查看集群的详细信息

您可以使用 ElastiCache 控制台、AWS CLI 或 ElastiCache API 查看有关一个或多个集群的详细信息。

(控制台) 查看 Redis (已禁用集群模式) 集群的详细信息

您可以使用 ElastiCache 控制台、适用于 ElastiCache 的 AWS CLI 或 ElastiCache API 来查看 Redis (已禁用集群模式) 集群的详细信息。

以下过程详细说明了如何使用 ElastiCache 控制台查看 Redis (已禁用集群模式) 集群的详细信息。

查看 Redis (已禁用集群模式) 集群的详细信息

  1. 登录 AWS 管理控制台 并通过以下网址打开 Amazon ElastiCache 控制台:https://console.amazonaws.cn/elasticache/

  2. 在 ElastiCache 控制台控制面板中,选择 Redis 可显示运行任意 Redis 版本的所有集群的列表。

    
							图像:Memcached 集群列表
  3. 要查看集群的详细信息,请选择集群名称左侧的复选框。确保所选的集群运行 Redis 引擎,而不是 Clustered Redis 引擎。执行此操作将显示该集群的详细信息,包括集群的主终端节点。

  4. 查看节点信息:

    1. 选择集群的名称。

    2. 选择 Nodes 选项卡。执行此操作将显示每个节点的详细信息,包括节点中用于从集群进行读取的终端节点。

    3. 要查看一个或多个节点的指标,请选择节点 ID 左侧的复选框,然后在 Time range 列表中选择指标的时间范围。如果您选择了多个节点,将看到重叠图表。

      图像:两个 Redis 节点过去一小时的指标

      两个 Redis 节点过去一小时的指标

(控制台) 查看 Redis (已启用集群模式) 集群的详细信息

您可以使用 ElastiCache 控制台、适用于 ElastiCache 的 AWS CLI 或 ElastiCache API 来查看 Redis (已启用集群模式) 集群的详细信息。

以下过程详细说明了如何使用 ElastiCache 控制台查看 Redis (已启用集群模式) 集群的详细信息。

查看 Redis (已启用集群模式) 集群的详细信息

  1. 登录 AWS 管理控制台 并通过以下网址打开 Amazon ElastiCache 控制台:https://console.amazonaws.cn/elasticache/

  2. 从右上角的列表中,选择您感兴趣的 AWS 区域。

  3. 在 ElastiCache 控制台控制面板中,选择 Redis 可显示运行任意 Redis 版本的所有集群的列表。

  4. 要查看 Redis (已启用集群模式) 集群的详细信息,请选择集群名称左侧的复选框。确保选择的是运行 Clustered Redis 引擎而不是 Redis 引擎的集群。

    该集群下方的屏幕会扩展,显示有关该集群的详细信息,包括该集群的配置终端节点。

  5. 要查看集群分片的列表及每个分片的节点数量,请选择集群的名称。

  6. 查看有关节点的特定信息:

    1. 选择分片的 ID。

    2. 选择 Nodes 选项卡。

      这将显示有关每个节点的信息,包括用于从集群中读取数据的每个节点的终端节点。

    3. 要查看一个或多个节点的指标,请选择节点 ID 左侧的复选框,然后在 Time range 列表中选择指标的时间范围。选择多个节点将生成重叠图表。

      图像:两个 Redis 节点过去一小时的指标

      两个 Redis 节点过去一小时的指标

(AWS CLI) 查看集群的详细信息

您可以使用 AWS CLI describe-cache-clusters 命令查看集群的详细信息。如果省略 --cache-cluster-id 参数,则会返回多个集群(最多 --max-items 个)的详细信息。如果包含 --cache-cluster-id 参数,则将返回指定的集群的详细信息。您可以使用 --max-items 参数限制返回的记录数。

以下代码列出了 my-cluster 的详细信息。

aws elasticache describe-cache-clusters --cache-cluster-id my-cluster

以下代码列出了最多 25 个集群的详细信息。

aws elasticache describe-cache-clusters --max-items 25

对于 Linux, OS X, or Unix:

aws elasticache describe-cache-clusters \ --cache-cluster-id my-cluster \ --show-cache-node-info

对于 Windows:

aws elasticache describe-cache-clusters ^ --cache-cluster-id my-cluster ^ --show-cache-node-info

此操作生成类似于下述信息的输出 (JSON 格式):

以下 JSON 输出适用于三个不同的 Redis 集群:

  • my-cluster1 – 包含 1 个节点的 Redis (已禁用集群模式) 集群。

  • my-cluster2 – 包含 2 个节点(一个主节点和一个只读副本节点)的 Redis (已禁用集群模式) 集群。

  • my-cluster22 – 包含2 个分片的 Redis (已启用集群模式) 集群,每个分片包含一个主节点和 2 个只读副本节点。此集群已启用加密。

{ "CacheClusters": [ { "CacheClusterStatus": "available", "SecurityGroups": [ { "Status": "active", "SecurityGroupId": "sg-dbe93fa2" } ], "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "Engine": "redis", "PreferredMaintenanceWindow": "wed:12:00-wed:13:00", "CacheSubnetGroupName": "default", "SnapshotWindow": "08:30-09:30", "TransitEncryptionEnabled": false, "AtRestEncryptionEnabled": false, "CacheClusterId": "my-cluster1", "CacheClusterCreateTime": "2018-02-26T21:06:43.420Z", "PreferredAvailabilityZone": "us-west-2c", "AuthTokenEnabled": false, "PendingModifiedValues": {}, "CacheNodeType": "cache.r4.large", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "ParameterApplyStatus": "in-sync", "CacheParameterGroupName": "default.redis3.2" }, "SnapshotRetentionLimit": 0, "AutoMinorVersionUpgrade": true, "EngineVersion": "3.2.10", "CacheSecurityGroups": [], "NumCacheNodes": 1 }
{ "CacheClusters": [ { "SecurityGroups": [ { "Status": "active", "SecurityGroupId": "sg-dbe93fa2" } ], "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "AuthTokenEnabled": false, "CacheSubnetGroupName": "default", "SnapshotWindow": "12:30-13:30", "AutoMinorVersionUpgrade": true, "CacheClusterCreateTime": "2018-02-26T21:13:24.250Z", "CacheClusterStatus": "available", "AtRestEncryptionEnabled": false, "PreferredAvailabilityZone": "us-west-2a", "TransitEncryptionEnabled": false, "ReplicationGroupId": "my-cluster2", "Engine": "redis", "PreferredMaintenanceWindow": "sun:08:30-sun:09:30", "CacheClusterId": "my-cluster2-001", "PendingModifiedValues": {}, "CacheNodeType": "cache.r4.large", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "ParameterApplyStatus": "in-sync", "CacheParameterGroupName": "default.redis3.2" }, "SnapshotRetentionLimit": 0, "EngineVersion": "3.2.10", "CacheSecurityGroups": [], "NumCacheNodes": 1 }, { "SecurityGroups": [ { "Status": "active", "SecurityGroupId": "sg-dbe93fa2" } ], "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "AuthTokenEnabled": false, "CacheSubnetGroupName": "default", "SnapshotWindow": "12:30-13:30", "AutoMinorVersionUpgrade": true, "CacheClusterCreateTime": "2018-02-26T21:13:24.250Z", "CacheClusterStatus": "available", "AtRestEncryptionEnabled": false, "PreferredAvailabilityZone": "us-west-2b", "TransitEncryptionEnabled": false, "ReplicationGroupId": "my-cluster2", "Engine": "redis", "PreferredMaintenanceWindow": "sun:08:30-sun:09:30", "CacheClusterId": "my-cluster2-002", "PendingModifiedValues": {}, "CacheNodeType": "cache.r4.large", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "ParameterApplyStatus": "in-sync", "CacheParameterGroupName": "default.redis3.2" }, "SnapshotRetentionLimit": 0, "EngineVersion": "3.2.10", "CacheSecurityGroups": [], "NumCacheNodes": 1 }, { "SecurityGroups": [ { "Status": "active", "SecurityGroupId": "sg-dbe93fa2" } ], "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "AuthTokenEnabled": false, "CacheSubnetGroupName": "default", "SnapshotWindow": "12:30-13:30", "AutoMinorVersionUpgrade": true, "CacheClusterCreateTime": "2018-02-26T21:13:24.250Z", "CacheClusterStatus": "available", "AtRestEncryptionEnabled": false, "PreferredAvailabilityZone": "us-west-2c", "TransitEncryptionEnabled": false, "ReplicationGroupId": "my-cluster2", "Engine": "redis", "PreferredMaintenanceWindow": "sun:08:30-sun:09:30", "CacheClusterId": "my-cluster2-003", "PendingModifiedValues": {}, "CacheNodeType": "cache.r4.large", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "ParameterApplyStatus": "in-sync", "CacheParameterGroupName": "default.redis3.2" }, "SnapshotRetentionLimit": 0, "EngineVersion": "3.2.10", "CacheSecurityGroups": [], "NumCacheNodes": 1 }
{ "CacheClusters": [ { "SecurityGroups": [ { "Status": "active", "SecurityGroupId": "sg-dbe93fa2" } ], "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "AuthTokenEnabled": true, "CacheSubnetGroupName": "default", "SnapshotWindow": "12:30-13:30", "AutoMinorVersionUpgrade": true, "CacheClusterCreateTime": "2018-02-26T21:17:01.439Z", "CacheClusterStatus": "available", "AtRestEncryptionEnabled": true, "PreferredAvailabilityZone": "us-west-2a", "TransitEncryptionEnabled": true, "ReplicationGroupId": "my-cluster3", "Engine": "redis", "PreferredMaintenanceWindow": "thu:11:00-thu:12:00", "CacheClusterId": "my-cluster3-0001-001", "PendingModifiedValues": {}, "CacheNodeType": "cache.r4.large", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "ParameterApplyStatus": "in-sync", "CacheParameterGroupName": "default.redis3.2.cluster.on" }, "SnapshotRetentionLimit": 0, "EngineVersion": "3.2.6", "CacheSecurityGroups": [], "NumCacheNodes": 1 }, { "SecurityGroups": [ { "Status": "active", "SecurityGroupId": "sg-dbe93fa2" } ], "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "AuthTokenEnabled": true, "CacheSubnetGroupName": "default", "SnapshotWindow": "12:30-13:30", "AutoMinorVersionUpgrade": true, "CacheClusterCreateTime": "2018-02-26T21:17:01.439Z", "CacheClusterStatus": "available", "AtRestEncryptionEnabled": true, "PreferredAvailabilityZone": "us-west-2b", "TransitEncryptionEnabled": true, "ReplicationGroupId": "my-cluster3", "Engine": "redis", "PreferredMaintenanceWindow": "thu:11:00-thu:12:00", "CacheClusterId": "my-cluster3-0001-002", "PendingModifiedValues": {}, "CacheNodeType": "cache.r4.large", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "ParameterApplyStatus": "in-sync", "CacheParameterGroupName": "default.redis3.2.cluster.on" }, "SnapshotRetentionLimit": 0, "EngineVersion": "3.2.6", "CacheSecurityGroups": [], "NumCacheNodes": 1 }, { "SecurityGroups": [ { "Status": "active", "SecurityGroupId": "sg-dbe93fa2" } ], "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "AuthTokenEnabled": true, "CacheSubnetGroupName": "default", "SnapshotWindow": "12:30-13:30", "AutoMinorVersionUpgrade": true, "CacheClusterCreateTime": "2018-02-26T21:17:01.439Z", "CacheClusterStatus": "available", "AtRestEncryptionEnabled": true, "PreferredAvailabilityZone": "us-west-2c", "TransitEncryptionEnabled": true, "ReplicationGroupId": "my-cluster3", "Engine": "redis", "PreferredMaintenanceWindow": "thu:11:00-thu:12:00", "CacheClusterId": "my-cluster3-0001-003", "PendingModifiedValues": {}, "CacheNodeType": "cache.r4.large", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "ParameterApplyStatus": "in-sync", "CacheParameterGroupName": "default.redis3.2.cluster.on" }, "SnapshotRetentionLimit": 0, "EngineVersion": "3.2.6", "CacheSecurityGroups": [], "NumCacheNodes": 1 }, { "SecurityGroups": [ { "Status": "active", "SecurityGroupId": "sg-dbe93fa2" } ], "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "AuthTokenEnabled": true, "CacheSubnetGroupName": "default", "SnapshotWindow": "12:30-13:30", "AutoMinorVersionUpgrade": true, "CacheClusterCreateTime": "2018-02-26T21:17:01.439Z", "CacheClusterStatus": "available", "AtRestEncryptionEnabled": true, "PreferredAvailabilityZone": "us-west-2b", "TransitEncryptionEnabled": true, "ReplicationGroupId": "my-cluster3", "Engine": "redis", "PreferredMaintenanceWindow": "thu:11:00-thu:12:00", "CacheClusterId": "my-cluster3-0002-001", "PendingModifiedValues": {}, "CacheNodeType": "cache.r4.large", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "ParameterApplyStatus": "in-sync", "CacheParameterGroupName": "default.redis3.2.cluster.on" }, "SnapshotRetentionLimit": 0, "EngineVersion": "3.2.6", "CacheSecurityGroups": [], "NumCacheNodes": 1 }, { "SecurityGroups": [ { "Status": "active", "SecurityGroupId": "sg-dbe93fa2" } ], "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "AuthTokenEnabled": true, "CacheSubnetGroupName": "default", "SnapshotWindow": "12:30-13:30", "AutoMinorVersionUpgrade": true, "CacheClusterCreateTime": "2018-02-26T21:17:01.439Z", "CacheClusterStatus": "available", "AtRestEncryptionEnabled": true, "PreferredAvailabilityZone": "us-west-2c", "TransitEncryptionEnabled": true, "ReplicationGroupId": "my-cluster3", "Engine": "redis", "PreferredMaintenanceWindow": "thu:11:00-thu:12:00", "CacheClusterId": "my-cluster3-0002-002", "PendingModifiedValues": {}, "CacheNodeType": "cache.r4.large", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "ParameterApplyStatus": "in-sync", "CacheParameterGroupName": "default.redis3.2.cluster.on" }, "SnapshotRetentionLimit": 0, "EngineVersion": "3.2.6", "CacheSecurityGroups": [], "NumCacheNodes": 1 }, { "SecurityGroups": [ { "Status": "active", "SecurityGroupId": "sg-dbe93fa2" } ], "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", "AuthTokenEnabled": true, "CacheSubnetGroupName": "default", "SnapshotWindow": "12:30-13:30", "AutoMinorVersionUpgrade": true, "CacheClusterCreateTime": "2018-02-26T21:17:01.439Z", "CacheClusterStatus": "available", "AtRestEncryptionEnabled": true, "PreferredAvailabilityZone": "us-west-2a", "TransitEncryptionEnabled": true, "ReplicationGroupId": "my-cluster3", "Engine": "redis", "PreferredMaintenanceWindow": "thu:11:00-thu:12:00", "CacheClusterId": "my-cluster3-0002-003", "PendingModifiedValues": {}, "CacheNodeType": "cache.r4.large", "CacheParameterGroup": { "CacheNodeIdsToReboot": [], "ParameterApplyStatus": "in-sync", "CacheParameterGroupName": "default.redis3.2.cluster.on" }, "SnapshotRetentionLimit": 0, "EngineVersion": "3.2.6", "CacheSecurityGroups": [], "NumCacheNodes": 1 } ] }

有关更多信息,请参阅适用于 ElastiCache 的 AWS CLI 主题 describe-cache-clusters

(ElastiCache API) 查看集群的详细信息

您可以使用 ElastiCache API DescribeCacheClusters 操作查看集群的详细信息。如果包含 CacheClusterId 参数,则将返回指定的集群的详细信息。如果省略 CacheClusterId 参数,则会返回最多 MaxRecords 个(默认 100 个)集群的详细信息。MaxRecords 的值不能小于 20 或大于 100。

以下代码列出了 my-cluster 的详细信息。

https://elasticache.us-west-2.amazonaws.com/ ?Action=DescribeCacheClusters &CacheClusterId=my-cluster &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>

以下代码列出了最多 25 个集群的详细信息。

https://elasticache.us-west-2.amazonaws.com/ ?Action=DescribeCacheClusters &MaxRecords=25 &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>

有关更多信息,请参阅 ElastiCache API 参考主题 DescribeCacheClusters