Queries the performance monitoring data of an ApsaraDB for Redis instance.

For information about how to query the monitoring data of an instance in the ApsaraDB for Redis console, see Metrics.


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

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeHistoryMonitorValues

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

RegionId String No cn-hangzhou

The region ID of the instance.

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance.

StartTime String Yes 2018-10-18T12:00:00Z

The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

EndTime String Yes 2018-10-19T12:00:00Z

The end of the time range to query. The end time must be later than the start time. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

  • You can query the monitoring data of the previous month. The maximum time range that you can specify for a query is seven days.
  • If the number of data nodes in the instance is greater than 32, the time range to query for the Data Node Aggregation and Proxy Node Aggregation metrics cannot exceed one hour.
IntervalForHistory String Yes 01m

The interval to collect monitoring data. Unit: minutes. Set the value to 01m.

MonitorKeys String No CpuUsage

The monitoring metrics. Separate the metrics with commas (,).

  • This parameter is empty by default, which indicates that the UsedMemory and quotaMemory metrics are returned. For more information about supported monitoring metrics and their descriptions, see MonitorKeys.
  • To ensure query efficiency, we recommend that you specify up to five metrics for a single node at a time, and specify only a single metric when you query aggregate metrics.
NodeId String No r-bp1zxszhcgatnx****-db-0#1679****

The ID of the node in the instance. You can set this parameter to query the data of a specified node.

  • This parameter is available for only read/write splitting or cluster instances of ApsaraDB for Redis.
  • You can call the DescribeLogicInstanceTopology operation to query node IDs.

Response parameters

Parameter Type Example Description
MonitorHistory String {\"2020-11-18T00:00:00Z\":{\"CpuUsage\":\"0.30\"},\"2020-11-18T00:02:00Z\":{\"CpuUsage\":\"0.60\"},\"2020-11-18T00:03:00Z\":{\"CpuUsage\":\"0.60\"}}

The monitoring data returned in the JSON format. For more information, see MonitorKeys.

  • Only metrics whose values are not 0 are returned. This improves data transmission efficiency. Metrics that are not displayed are represented by the 0 default value.
  • The query result is aligned with the data aggregation frequency. If the specified time range to query is less than 10 minutes and the data aggregation frequency is every 5 seconds, query results are returned at an interval of 5 seconds. If the specified StartTime value does not coincide with a point in time for data aggregation, the system returns the latest point in time for data aggregation as the first point in time. For example, if you set the StartTime parameter to 2022-01-20T12:01:48Z, the first point in time returned is 2022-01-20T12:01:45Z.
RequestId String F0997EE8-F4C2-4503-9168-85177ED7****

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "MonitorHistory" : "{\"2020-11-18T00:00:00Z\":{\"CpuUsage\":\"0.30\"},\"2020-11-18T00:02:00Z\":{\"CpuUsage\":\"0.60\"},\"2020-11-18T00:03:00Z\":{\"CpuUsage\":\"0.60\"}}",
  "RequestId" : "689E8093-3094-4DC2-A2A2-30D40097****"

Error codes

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