Queries the metrics of an ApsaraDB for Redis instance.

Note ApsaraDB for Redis has upgraded the monitoring metrics. The DescribeMonitorItems operation is phased out. For more information, see The DescribeMonitorItems operation supported by ApsaraDB for Redis is phased out.

After you call this operation to retrieve a list of metrics for a specified ApsaraDB for Redis instance, you can call the DescribeHistoryMonitorValues operation to query monitoring history of the instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer automatically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeMonitorItems

The operation that you want to perform. Set the value to DescribeMonitorItems.

RegionId String No cn-hangzhou

The ID of the region where the instance is deployed.

Response parameters

Parameter Type Example Description
MonitorItems Array of KVStoreMonitorItem

The returned metrics.

Note
  • memoryUsage, GetQps, and PutQps are supported only by ApsaraDB for Redis instances that use Redis 4.0 or later. GetQps and PutQps require the latest minor version. You can upgrade the major version or minor version of the instance as needed. For more information, see Upgrade the major version and Upgrade the minor version.
  • When you use instances of Redis 2.8, if the hit_rate metric is not displayed, you must upgrade the minor version of the instance. For more information, see Upgrade the minor version.
KVStoreMonitorItem
MonitorKey String select

The metric.

Unit String Counts/s

The unit of the metric.

RequestId String 8BEB2618-9517-43F3-A233-E0B34512****

The ID of the request.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/?Action=DescribeMonitorItems
&<Common request parameters>

Sample success responses

XML format

<DescribeMonitorItemsResponse>
	  <RequestId>8BEB2618-9517-43F3-A233-E0B34512****</RequestId>
	  <MonitorItems>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>discard</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>zcount</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>select</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>sunionstore</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>zunionstore</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>del</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>zinterstore</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>echo</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>hscan</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>psubscribe</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>type</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>sinterstore</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>multi</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>randomkey</MonitorKey>
		    </KVStoreMonitorItem>
		    <KVStoreMonitorItem>
			      <Unit>Counts/s</Unit>
			      <MonitorKey>setex</MonitorKey>
		    </KVStoreMonitorItem>
	  </MonitorItems>
</DescribeMonitorItemsResponse>

JSON format

{
    "RequestId": "8BEB2618-9517-43F3-A233-E0B34512****",
    "MonitorItems": {
        "KVStoreMonitorItem": [
            {
                "Unit": "Counts/s",
                "MonitorKey": "discard"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "zcount"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "select"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "sunionstore"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "zunionstore"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "del"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "zinterstore"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "echo"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "hscan"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "psubscribe"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "type"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "sinterstore"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "multi"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "randomkey"
            },
            {
                "Unit": "Counts/s",
                "MonitorKey": "setex"
            }
        ]
    }
}

Error codes

For a list of error codes, visit the API Error Center.