Queries the monitoring history of an ApsaraDB for Redis instance.

You can also query the monitoring history in the console. For more information, see Performance metrics.

Debugging

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 Command Required Example Description
Action String No 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. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. The end time must be later than the start time.

InstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the ApsaraDB for Redis instance that you want to manage.

IntervalForHistory String Yes 01m

The interval for collecting 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 ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

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

The ID of the node in the cluster. You must set this parameter when you query the information on a specified node in the cluster.

MonitorKeys String No hscan

The metric. You can call the DescribeMonitorItems operation to query the 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 your instance as needed. For more information, see Upgrade the major version and Upgrade the minor version.
RegionId String No cn-hangzhou

The ID of the region where the instance is deployed.

Response parameters

Parameter Command 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 returned monitoring history in the JSON format.

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

The ID of the request.

Examples

Sample requests

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 responses

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:00:13Z":{
            "quotaMemory":1073741824,
            "UsedMemory":5823152
        },
        "2018-07-09T12:13:15Z":{
            "quotaMemory":1073741824,
            "UsedMemory":5823152
        },
        "2018-07-09T12:14:15Z":{
            "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 format of the beginning time is invalid. The time must be in UTC. Example: 2011-06-11T16:00Z.
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 UTC. Example: 2011-06-11T16:00Z.

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