You can call this operation to query historical monitoring information of an ApsaraDB for Redis instance.

For more information about how to perform the corresponding operation in the console, see Understand metrics.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeHistoryMonitorValues

The operation that you want to perform. Set this parameter to DescribeHistoryMonitorValues.

InstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance for which you want to query historical monitoring information.

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

The beginning of the time range where historical monitoring information is queried. The time must be in UTC. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format.

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

The end of the time range where historical monitoring information is queried. The time must be in UTC. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The end time must be later than the start time.

IntervalForHistory String Yes 01m

The interval for collecting historical monitoring information. Unit: minutes. Set this parameter to 01m.

AccessKeyId String No Lxxxxxxxxxxxxxxw

The AccessKey ID that Alibaba Cloud provides for you to access services.

MonitorKeys String No hscan

The metrics. You can call the DescribeMonitorItems operation to query the metrics.

NodeId String No r-bp1xxxxxxxxxxxxx-db-0#6xxxxx5

The ID of the node in the cluster. You need to specify this parameter when you query a specified node in the cluster.

Response parameters

Parameter Type Example Description
MonitorHistory String {"2018-07-09T12:00:13Z": {"quotaMemory": 1073741824,"UsedMemory": 5823152},"2018-07-09T12:13:15Z": {"quotaMemory": 1073741824,"UsedMemory": 5823152},"2018-07-09T12:14:15Z": {"quotaMemory": 1073741824,"UsedMemory": 5823152}}

The historical monitoring information that was returned in the JSON format.

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

The ID of the request.

Examples

Sample request


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

Sample success response

XML format

<DescribeHistoryMonitorValuesResponse>
 <monitorHistory>
   <2018-07-09T12:00:13Z>
     <quotaMemory>1073741824</quotaMemory>
     <UsedMemory>5823152</UsedMemory>
   </2018-07-09T12:00:13Z>
   <2018-07-09T12:13:15Z>
     <quotaMemory>1073741824</quotaMemory>
     <UsedMemory>5823152</UsedMemory>
   </2018-07-09T12:13:15Z>
   <2018-07-09T12:14:15Z>
     <quotaMemory>1073741824</quotaMemory>
     <UsedMemory>5823152</UsedMemory>
   </2018-07-09T12:14:15Z>
 </monitorHistory>
 <requestId>F0997EE8-F4C2-4503-9168-85177ED78C70</requestId>
</DescribeHistoryMonitorValuesResponse>

JSON format

{
	"monitorHistory":{
		"2018-07-09T12:13:15Z":{
			"quotaMemory":1073741824,
			"UsedMemory":5823152
		},
		"2018-07-09T12:14:15Z":{
			"quotaMemory":1073741824,
			"UsedMemory":5823152
		},
		"2018-07-09T12:00:13Z":{
			"quotaMemory":1073741824,
			"UsedMemory":5823152
		}
	},
	"requestId":"F0997EE8-F4C2-4503-9168-85177ED78C70"
}

Error codes

HTTP status code Error code Error message Description
400 InvalidStartTime.Malformed The Specified parameter "StartTime" is not valid. The error message returned because the verification of the start time failed owing to the incorrect format. The time must be in GMT. Example: 2011-06-11T16:00Z.
400 InvalidEndTime.Malformed The Specified parameter "EndTime" is not valid. The error message returned because the verification of the end time failed owing to the incorrect format. The time must be in GMT. Example: 2011-06-11T16:00Z.

View error codes.