Queries the monitoring history of an ApsaraDB for Redis instance.

You can also query the monitoring history in the ApsaraDB for Redis console. For more information, see Monitoring metrics.

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 DescribeHistoryMonitorValues

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

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.

Note If the number of data nodes in the instance is greater than 32, the query time for the Data Node Aggregation and Proxy Node Aggregation metrics cannot exceed one hour.
InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the ApsaraDB for Redis instance.

IntervalForHistory String Yes 01m

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

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.

NodeId String No r-bp1xxxxxxxxxxxxx-db-0

The ID of the node on the instance. You can set this parameter to query the monitoring information of a specified node.

Note
  • This parameter is available only for read/write splitting instances or cluster instances of ApsaraDB for Redis.
  • To retrieve the node ID, you can call the DescribeLogicInstanceTopology operation.
MonitorKeys String No CpuUsage

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

Note
  • To ensure query efficiency, we recommend that you specify no more than five metrics for a single node, and only one metric at a time when you query aggregate metrics.
  • For more information about monitoring metrics that are supported by ApsaraDB for Redis and descriptions, see Query monitoring data (MonitorKeys).
RegionId String No cn-hangzhou

The ID of the region where the instance is deployed.

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 information is returned in the JSON format. For more information, see Monitoring metrics.

Note Only metrics whose values are not 0 were returned. This improves data transmission efficiency. Metrics that are not displayed are all the default value 0.
RequestId String F0997EE8-F4C2-4503-9168-85177ED7****

The ID of the request.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/?Action=DescribeHistoryMonitorValues
&InstanceId=r-bp1zxszhcgatnx****
&StartTime=2018-10-18T12:00:00Z
&EndTime=2018-10-18T12:03:00Z
&IntervalForHistory=01m
&MonitorKeys=CpuUsage
&<Common request parameters>

Sample success responses

XML format

<DescribeHistoryMonitorValuesResponse>
      <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"}}</MonitorHistory>
      <RequestId>689E8093-3094-4DC2-A2A2-30D40097****</RequestId>
</DescribeHistoryMonitorValuesResponse>

JSON format

{
	"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

HttpCode Error code Error message Description
400 InvalidEndTime.Malformed The Specified parameter "EndTime" is not valid. The error message returned because the format of the end time is invalid. The time must be in GMT. Example: 2011-06-11T16:00Z.

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