All Products
Search
Document Center

ApsaraDB for Redis:DescribeHistoryMonitorValues

Last Updated:Feb 20, 2024

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

Operation description

You can also query the performance monitoring data of an instance in the ApsaraDB for Redis console. For more information, see Metrics .

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
kvstore:DescribeHistoryMonitorValuesREAD
  • DBInstance
    acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}
  • kvstore:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

r-bp1zxszhcgatnx****
StartTimestringYes

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.

2022-11-06T00:00:00Z
EndTimestringYes

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 last 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 1 hour.
2022-11-06T00:30:00Z
IntervalForHistorystringYes

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

01m
MonitorKeysstringNo

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

  • This parameter is empty by default. The UsedMemory and quotaMemory metrics are returned. For information about the metrics that are supported by ApsaraDB for Redis instances and their descriptions, see View performance monitoring data.

  • To ensure query efficiency, we recommend that you specify no more than five metrics for a single node at a time, and specify only a single metric when you query aggregate metrics.

memoryUsage
NodeIdstringNo

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 only for read/write splitting or cluster instances of ApsaraDB for Redis.

  • You can call the DescribeLogicInstanceTopology operation to query node IDs.

r-bp1zxszhcgatnx****-db-0#1679****

Response parameters

ParameterTypeDescriptionExample
object
MonitorHistorystring

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

  • 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 or equal to 10 minutes and the data is aggregated once 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.

"{\"2022-11-06T00:00:00Z\":{\"memoryUsage\":\"6.67\"},\"2022-11-06T00:00:05Z\":{\"memoryUsage\":\"6.67\"},\"2022-11-06T00:00:10Z\":{\"memoryUsage\":\"6.67\"},\"2022-11-06T00:00:15Z\":{\"memoryUsage\":\"6.67\"},\"2022-11-06T00:00:20Z\":{\"memoryUsage\":\"6.67\"},\"2022-11-06T00:00:25Z\":{\"memoryUsage\":\"6.67\"}}"
RequestIdstring

The ID of the request.

F0997EE8-F4C2-4503-9168-85177ED7****

Examples

Sample success responses

JSONformat

{
  "MonitorHistory": "\"{\\\"2022-11-06T00:00:00Z\\\":{\\\"memoryUsage\\\":\\\"6.67\\\"},\\\"2022-11-06T00:00:05Z\\\":{\\\"memoryUsage\\\":\\\"6.67\\\"},\\\"2022-11-06T00:00:10Z\\\":{\\\"memoryUsage\\\":\\\"6.67\\\"},\\\"2022-11-06T00:00:15Z\\\":{\\\"memoryUsage\\\":\\\"6.67\\\"},\\\"2022-11-06T00:00:20Z\\\":{\\\"memoryUsage\\\":\\\"6.67\\\"},\\\"2022-11-06T00:00:25Z\\\":{\\\"memoryUsage\\\":\\\"6.67\\\"}}\"",
  "RequestId": "F0997EE8-F4C2-4503-9168-85177ED7****"
}

Error codes

HTTP status codeError codeError message
400InvalidStartTime.MalformedThe Specified parameter "StartTime" is not valid.
400InvalidEndTime.MalformedThe Specified parameter "EndTime" is not valid.

For a list of error codes, visit the Service error codes.