All Products
Search
Document Center

Tair (Redis® OSS-Compatible):DescribeHistoryMonitorValues

Last Updated:Aug 26, 2026

Queries the performance monitoring information of an ApsaraDB for Tair (Redis® OSS-Compatible) database instance.

Operation description

For the console operation corresponding to this API, see Performance monitoring.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

kvstore:DescribeHistoryMonitorValues

get

*DBInstance

acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}

  • kvstore:ResourceTag
  • kvstore:ResourceTag
  • kvstore:ResourceTag
  • kvstore:ResourceTag
None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

r-bp1zxszhcgatnx******

StartTime

string

Yes

The start time of the query for historical monitoring data. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

2022-11-06T00:00:00Z

EndTime

string

Yes

The end time of the query for historical monitoring data. The end time must be later than the start time. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

Note

You can query monitoring data from the last month, and the maximum query range cannot exceed 7 days.

2022-11-06T00:30:00Z

IntervalForHistory

string

Yes

[Deprecated] This parameter is deprecated and has a fixed value of 01m.

The system automatically determines the query interval based on the start time and end time. For example, if the query time range is less than or equal to 10 minutes, the data aggregation frequency is 5s, and the query results are returned at a frequency of 5s.

Note
  • The query results are aligned with the data aggregation frequency of the instance. If the StartTime you specify does not fall on a data aggregation time point, the first time point returned by the system is the nearest data aggregation time point. For example, if the StartTime you specify is 2022-01-20T12:01:48Z, the first time point returned by the system is 2022-01-20T12:01:45Z.

  • If the number of data shards of the instance is greater than or equal to 32, the minimum data aggregation frequency is 1 minute.

01m

MonitorKeys

string

No

The monitoring metrics. To specify multiple monitoring metrics, separate them with commas (,). Using CpuUsage as an example:

  • Cluster or read/write splitting architecture:

    • To query the overall CPU usage of all data nodes (DB), specify CpuUsage$db.

    • To query the CPU usage of a single data node, specify CpuUsage and set the NodeId parameter to the DB node.

  • Standard architecture (primary/secondary): Specify CpuUsage.

For more monitoring metrics and detailed descriptions, see MonitorKeys parameter description.

Note
  • The default value is empty, which returns the UsedMemory and quotaMemory metrics.

  • To ensure query efficiency, when querying monitoring metrics for a single node, specify no more than 5 monitoring metrics per request. When querying aggregated monitoring metrics, specify no more than 1 monitoring metric per request.

CpuUsage

NodeId

string

No

The node ID in the instance. Specify this parameter to query the monitoring information of a specific node.

Note
  • This parameter is available only when the instance architecture is read/write splitting or cluster.

  • Call the DescribeLogicInstanceTopology operation to query node IDs.

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

NodeRole

string

No

To query the metrics of read-only nodes in a cloud-native read/write splitting architecture instance, specify the specific NodeId and set this parameter to READONLY.

Note

In other cases, you do not need to specify this parameter (or specify MASTER).

READONLY

Type

string

No

MonitorKeys parameter description

When calling the OpenAPI, specify the parameters in the MonitorKeys column in the following table. The system returns the sub-metrics. Instances support general monitoring metrics and command statistics monitoring metrics.

General monitoring metrics

The following describes how to use general monitoring metrics. Using CpuUsage as an example:

  • Cluster or read/write splitting architecture:

    • To query the overall CPU usage of all data nodes (DB): Specify CpuUsage$db.

    • To query the overall CPU usage of all Proxy nodes: Specify CpuUsage$proxy.

    • To query the CPU usage of a single data node or Proxy node: Specify CpuUsage and set the NodeId parameter to the DB node or Proxy node.

  • Standard architecture (primary/secondary): Specify CpuUsage.

MonitorKeys

Sub-metric

Unit

Description

Supported scope

CpuUsage

CpuUsage

%

The CPU usage. Value range: 0 to 100.

Note

If your instance previously used or returned the RedisCpuUsage parameter, you can still use the original parameter.

  • DB

  • DB aggregation

  • Proxy

  • Proxy aggregation

MemoryUsage

memoryUsage

%

The memory usage.

  • DB

  • DB aggregation

quotaMemory

quotaMemory

Bytes

The total memory of the current shard.

  • DB

  • DB aggregation

UsedMemory

UsedMemory

Bytes

The used memory, including data and cache.

  • DB

  • DB aggregation

Tair_PmemUsage

PmemUsage

%

The persistent memory usage, used persistent memory, and total persistent memory, respectively.

Only persistent memory-optimized instances support this metric.

  • DB

  • DB aggregation

Tair_Pmem

PmemUsed

Bytes

PmemQuota

Bytes

Redis_DetailedSpaceUsage

ins_size

MB

The total instance storage space, the disk space used by data files (including AOF and RDB files), and the disk space used by log files (including operation logs), respectively.

Only memory-optimized instances in classic deployment mode (formerly local disk) support this metric.

  • DB

  • DB aggregation

data_size

MB

log_size

MB

Redis_Memory_Monitor

used_memory_rss

Bytes

The physical memory occupied by the process, which is the memory allocated by the operating system to the Tair service.

  • DB

used_memory_lua

Bytes

The memory used by Lua scripts.

used_memory_startup

Bytes

The memory consumed when Tair starts.

lazyfree_pending_objects

Counts

The number of keys pending actual memory reclamation during Tair lazy free operations.

used_memory_overhead

Bytes

The memory overhead required by Tair to maintain internal mechanisms of the dataset, including output buffers of all clients, query buffers, and AOF.

used_memory_dataset

Bytes

The memory space occupied by data.

CustomerMemoryUsage

CustomerMemoryUsage

%

The user memory usage. Value range: 0 to 100.

  • DB

  • DB aggregation

UsedQPS

TotalQps

Counts/s

The total number of requests per second, including read and write commands.

  • DB

  • DB aggregation

  • Proxy

  • Proxy aggregation

GetQps

Counts/s

The number of read and write command requests per second, respectively. The compatible version of the instance must be Redis 4.0 or later.

PutQps

Counts/s

OtherOps

Counts/s

Requests without read or write attributes, such as PING, INFO, SELECT, and AUTH. Because Proxy performs special processing on requests, if the instance has Proxy nodes, OtherOps includes only some INFO requests.

ConnectionUsage

connectionUsage

%

The connection usage. Calculation method: number of used connections ÷ total number of connections supported by the instance. This metric is useful when clients connect to a Tair instance (cluster architecture) through a direct connection address.

  • DB

  • DB aggregation

UsedConnection

ConnCount

Counts

The number of used connections.

IntranetIn

InFlow

KB/s

The inbound and outbound traffic rates.

  • DB

  • DB aggregation

  • Proxy

  • Proxy aggregation

IntranetOut

OutFlow

KB/s

IntranetInRatio

intranetInRatio

%

The inbound and outbound traffic usage.

  • DB

  • DB aggregation

IntranetOutRatio

intranetOutRatio

%

Redis_Avg_Rt_Monitor

AvgRt

us

The average latency, which indicates the average time from when the backend node receives a command to when it sends a response.

  • The metric for DB nodes does not include the time consumed by Proxy and load balancing.

  • The metric for Proxy nodes includes the time consumed by DB and Proxy, but does not include the time consumed by load balancing.

  • DB

Response elements

Element

Type

Description

Example

object

MonitorHistory

string

The monitoring information returned in JSON format. For more information, see Monitoring parameter description.

Note

To improve data transmission efficiency, only non-zero monitoring data is returned. All other monitoring data that is not displayed has a default value of 0.

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

string

The request ID.

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

MonitorLegend

string

Examples

Success response

JSON format

{
  "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****",
  "MonitorLegend": ""
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidStartTime.Malformed The Specified parameter "StartTime" is not valid.
400 InvalidEndTime.Malformed The Specified parameter "EndTime" is not valid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.