All Products
Search
Document Center

Tair (Redis® OSS-Compatible):DescribeHistoryMonitorValues

Last Updated:Mar 30, 2026

Monitor the performance of an ApsaraDB for Tair (Redis-compatible) instance.

Operation description

For the console equivalent, 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 range. The time must be in the yyyy-MM-ddTHH:mm:ssZ format and in UTC.

2022-11-06T00:00:00Z

EndTime

string

Yes

The end time of the query range. This time must be later than the start time. The time must be in the yyyy-MM-ddTHH:mm:ssZ format and in UTC.

Note

You can query data from within the last month. A single query can span a maximum of 7 days.

2022-11-06T00:30:00Z

IntervalForHistory

string

Yes

This parameter is deprecated. The value is fixed at 01m.

The system automatically determines the query interval based on the specified start and end times. For example, if the time range is 10 minutes or less, the data aggregation frequency is 5 seconds, and returns data points every 5 seconds.

Note
  • The timestamps of returned data points are aligned with the instance's data aggregation frequency. If the specified StartTime does not align with an aggregation timestamp, the system uses the nearest preceding timestamp. For example, if you specify StartTime as 2022-01-20T12:01:48Z, the timestamp of the first returned data point is 2022-01-20T12:01:45Z.

  • If the instance has 32 or more data shards, the minimum data aggregation frequency is 1 minute.

01m

MonitorKeys

string

No

The metrics to query. To specify multiple metrics, separate them with a comma (,). For example, consider the CpuUsage metric:

  • For a cluster or read/write splitting instance:

    • To query the overall CPU utilization of all data nodes (DB), set this parameter to CpuUsage$db.

    • To query the CPU utilization of a single data node, set this parameter to CpuUsage and set the NodeId parameter to the ID of the data node.

  • For a standard primary/standby instance, set this parameter to CpuUsage.

For more metrics and detailed descriptions, see Additional information about the MonitorKeys parameter.

Note
  • If you do not specify this parameter, the UsedMemory and quotaMemory metrics are returned by default.

  • For optimal query performance, we recommend that you specify a maximum of 5 metrics per request for a single node, and a maximum of 1 metric per request for aggregated metrics.

CpuUsage

NodeId

string

No

The ID of the node for which to query metrics.

Note
  • This parameter is available only for instances that use a cluster or read/write splitting architecture.

  • You can call the DescribeLogicInstanceTopology operation to obtain the node ID.

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

NodeRole

string

No

To query metrics for a read-only node in a cloud-native read/write splitting instance, you must specify the NodeId and set this parameter to READONLY.

Note

For all other scenarios, you can omit this parameter or set it to MASTER.

READONLY

Type

string

No

MonitorKeys parameter

When you call this API operation, pass a parameter from the MonitorKeys column in the tables below. This operation returns the corresponding sub-monitoring items. An instance supports both general and command statistics monitoring items.

General monitoring items

The following section describes how to use general monitoring items, using CpuUsage as an example.

  • For an instance with a cluster or read/write splitting architecture:

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

    • To query the overall CPU usage of all proxy nodes, pass CpuUsage$proxy.

    • To query the CPU usage of a single data node or proxy node, pass CpuUsage and specify the target node in the NodeId parameter.

  • For an instance with a standard (primary/standby) architecture, pass CpuUsage.

MonitorKeys

Sub-monitoring item

Unit

Description

Supported scope

CpuUsage

CpuUsage

%

CPU usage. The value ranges from 0 to 100.

Note

If your instance previously passed or returned the RedisCpuUsage parameter, you can continue to use it.

  • DB

  • DB aggregation

  • Proxy

  • Proxy aggregation

MemoryUsage

memoryUsage

%

Memory usage.

  • DB

  • DB aggregation

quotaMemory

quotaMemory

Bytes

The total memory of the current shard.

  • DB

  • DB aggregation

UsedMemory

UsedMemory

Bytes

The amount of used memory, including data and cache.

  • DB

  • DB aggregation

Tair_PmemUsage

PmemUsage

%

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

These monitoring items are supported only by persistent memory instances.

  • DB

  • DB aggregation

Tair_Pmem

PmemUsed

Bytes

PmemQuota

Bytes

Redis_DetailedSpaceUsage

ins_size

MB

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

These monitoring items are supported only by memory-optimized instances in classic deployment mode (local disk).

  • DB

  • DB aggregation

data_size

MB

log_size

MB

Redis_Memory_Monitor

used_memory_rss

Bytes

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

  • DB

used_memory_lua

Bytes

The amount of memory used by Lua scripts.

used_memory_startup

Bytes

The memory consumed by Tair at startup.

lazyfree_pending_objects

Counts

The number of keys pending reclamation by Tair's lazy free process.

used_memory_overhead

Bytes

The memory overhead required by Tair for internal data management. This includes all client output buffers, query buffers, and AOF.

used_memory_dataset

Bytes

The memory space used by the dataset.

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 requests per second, respectively. The instance must be compatible with Redis 4.0 or later.

PutQps

Counts/s

OtherOps

Counts/s

Requests that do not have read or write attributes, such as PING, INFO, SELECT, and AUTH. If an instance uses proxy nodes, this monitoring item includes only some INFO requests due to special handling by the proxy nodes.

ConnectionUsage

connectionUsage

%

The percentage of used connections. Formula: Used Connections / Total Connections Supported by the instance. This monitoring item is relevant when clients use a direct connection address to connect to aTair cluster instance.

  • DB

  • DB aggregation

UsedConnection

ConnCount

Counts

The number of used connections.

IntranetIn

InFlow

KB/s

The rate of inbound and outbound traffic.

  • DB

  • DB aggregation

  • Proxy

  • Proxy aggregation

IntranetOut

OutFlow

KB/s

IntranetInRatio

intranetInRatio

%

The usage rate of inbound and outbound traffic.

  • DB

  • DB aggregation

IntranetOutRatio

intranetOutRatio

%

Redis_Avg_Rt_Monitor

AvgRt

us

The average time from when a backend node receives a command to when it sends a response.

  • For a data node, this monitoring item does not include latency from proxy nodes or load balancing.

  • For a proxy node, this monitoring item includes the latency of both the data node and the proxy node, but not the latency from load balancing.

  • DB

  • DB aggregation

  • Proxy

  • Proxy aggregation

Redis_Max_Rt_Monitor

MaxRt

us

The maximum time from when a node receives a command to when it sends a response.

  • For a data node, this monitoring item does not include latency from proxy nodes or load balancing.

  • For a proxy node, this monitoring item includes the latency of both the data node and the proxy node, but not the latency from load balancing.

Redis_Basic_Monitor

Keys

Counts

The total number of top-level keys stored in the instance.

  • DB

  • DB aggregation

Expires

Counts

The number of keys with a configured expiration time. This value is a snapshot taken at the time of data collection.

ExpiredKeys

Counts

The cumulative number of keys that have expired.

EvictedKeys

Counts

The cumulative number of keys that have been evicted.

ExpiredKeysPerSecond

Counts/s

The number of keys that expire per second.

EvictedKeysPerSecond

Counts/s

The number of keys that are evicted per second.

inmem_keys

Counts

These monitoring items are supported only by hybrid storage instances (which are discontinued) and can be ignored.

swapped_keys

Counts

Hit_Rate_Monitor

hit_rate

%

The key hit rate. Formula: Key Hits / (Key Hits + Key Misses).

  • DB

  • DB aggregation

hit

Counts

The number of key hits per second.

miss

Counts

The number of key misses per second.

evicted_keys_per_sec

Counts

The number of keys evicted per second.

DiskUsage

disk_usage

%

The disk usage, input buffer size, output buffer size, and disk performance monitoring items, respectively. These items are supported only by instances that use disk storage.

  • DB

RocksDBConn

Tair_Connection_Monitor

Bytes

Tair_Connection_Monitor

Bytes

Tair_Disk_Monitor

io_bandwidth_kbps, iops, iops_usage, etc.

%, ms, Counts, etc.

UsedConnection

ConnectionUsage

%

The percentage of used connections. Formula: Used Connections / Maximum Connections Supported by the node. This monitoring item is relevant forTair cluster or read/write splitting instances when clients connect through proxy nodes.

  • Proxy

  • Proxy aggregation

UsedConnection

Counts

The number of used connections.

NewUserConnQps

Counts/s

The number of connections established per second from clients to a proxy node.

Redis_Package_Monitor

request

Byte

The average size of a single request, in bytes.

  • Proxy

response

Byte

The average size of a single response, in bytes.

request_max

Byte

The maximum size of a single request, in bytes.

response_max

Byte

The maximum size of a single response, in bytes.

RedisProxyConn

RedisUsedConnection

Counts

The number of connections from proxy nodes to data nodes.

NewDBConnQps

Counts/s

The number of connections established per second from proxy nodes to data nodes.

DisconnectDBConn

Counts

The cumulative number of disconnections from proxy nodes to data nodes.

DisconnectUserConn

Counts

The cumulative number of disconnections from clients to proxy nodes.

TotalCalls

TotalRefusedCommands

Counts

The cumulative number of rejected commands.

TotalCallsPerSecCalls

Counts/s

The number of requests per second.

TotalCallsPerSecRetryCalls

Counts/s

The number of request retries per second.

TotalCallsPerSecRetryFailed

Counts/s

The number of failed requests per second.

Command statistics monitoring items

You can only query command statistics monitoring items for a specific data node. To do this, you must pass the corresponding MonitorKeys parameter and also specify the data node in the NodeId parameter.
Note

The Tair extended command monitoring group is supported only by memory-optimized instances in classic deployment mode (local disk).

MonitorKeys

Sub-monitoring item

Unit

Description

Redis_Keys_Monitor

del, dump, exists, expire, expireat, move, persist, pexpire, pexpireat, pttl, randomkey, rename, renamenx, restore, sort, ttl, type, scan

Counts/s

Monitoring items for key-related commands, such as the number of calls per second for commands like DEL and EXISTS.

Redis_String_Monitor

append, bitcount, bitop, decr, decrby, get, getbit, getrange, getset, incr, incrby, incrbyfloat, mget, mset, msetnx, psetex, set, setbit, setex, setnx, setrange, strlen

Counts/s

Monitoring items for commands related to the String data type, such as the number of calls per second for commands like APPEND and MGET.

Redis_Hashes_Monitor

hdel, hexists, hget, hgetall, hincrby, hincrbyfloat, hkeys, hlen, hmget, hmset, hset, hsetnx, hvals, hscan

Counts/s

Monitoring items for commands related to the Hash data type, such as the number of calls per second for commands like HGET and HDEL.

Redis_Lists_Monitor

blpop, brpop, brpoplpush, lindex, linsert, llen, lpop, lpush, lpushx, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushx

Counts/s

Monitoring items for commands related to the List data type, such as the number of calls per second for commands like BLPOP and BRPOP.

Redis_Sets_Monitor

sadd, scard, sdiff, sdiffstore, sinter, sinterstore, sismember, smembers, smove, spop, srandmember, srem, sunion, sunionstore, sscan

Counts/s

Monitoring items for commands related to the Set data type, such as the number of calls per second for commands like SADD and SCARD.

Redis_Zset_Monitor

zadd, zcard, zcount, zincrby, zrange, zrangebyscore, zrank, zrem, zremrangebyrank, zremrangebyscore, zrevrange, zrevrangebyscore, zrevrank, zscore, zunionstore, zinterstore, zscan, zrangebylex, zlexcount, zremrangebylex, zpopmin, zpopmax, bzpopmin, bzpopmax

Counts/s

Monitoring items for commands related to the Zset (sorted set) data type, such as the number of calls per second for commands like ZADD and ZCARD.

Redis_Hyperlog_Monitor

pfadd, pfcount, pfmerge

Counts/s

Monitoring items for commands related to the HyperLogLog data type, such as the number of calls per second for commands like PFADD and PFCOUNT.

Redis_Pub_Sub_Monitor

psubscribe, publish, pubsub, punsubscribe, subscribe, unsubscribe

Counts/s

Monitoring items for commands related to the publish/subscribe (Pub/Sub) feature, such as the number of calls per second for commands like PUBLISH and SUBSCRIBE.

Redis_Transaction_Monitor

discard, exec, multi, unwatch, watch

Counts/s

Monitoring items for transaction-related commands, such as the number of calls per second for commands like WATCH and MULTI.

Redis_Scripting_Monitor

eval, evalsha, script

Counts/s

Monitoring items for scripting-related commands, such as the number of calls per second for commands like EVAL and EVALSHA.

Calls_Monitor

flushall_calls, flushdb_calls, keys_calls

Counts

The cumulative number of calls for the FLUSHALL, FLUSHDB, and KEYS commands.

Redis_Connection_Monitor

auth, echo, ping, quit, select

Counts/s

Monitoring items for connection-related commands, such as the number of calls per second for commands like AUTH and ECHO.

Redis_Server_Monitor

bgsave, client, command, config, dbsize, debug, flushall, flushdb, info, monitor, slowlog, time

Counts/s

Monitoring items for server-related commands, such as the number of calls per second for commands like BGSAVE and CONFIG.

Redis_Geo_Monitor

geoadd, geohash, geopos, geodist, georadius, georadiusbymember

Counts/s

Monitoring items for Geo-related commands, such as the number of calls per second for commands like GEOADD and GEOHASH.

Redis_Streams_Monitor

xinfo, xadd, xtrim, xdel, xrange, xrevrange, xlen, xread, xgroup, xreadgroup, xack, xclaim, xpending

Counts/s

Monitoring items for Streams-related commands, such as the number of calls per second for commands like XINFO and XADD.

Redis_TairDoc_Monitor

jsondel, jsonget, jsonmget, jsonset, jsontype, jsonnumincrby, jsonstrappend, jsonstrlen, jsonarrappend, jsonarrpop, jsonarrinsert, jsonarrlen, jsonarrtrim

Counts/s

Doc monitoring group: Monitoring items for Doc-related commands, such as the number of calls per second for commands like jsonset and jsonget.

Redis_TairHash_Monitor

exhset, exhsetnx, exhmset, exhexpireat, exhexpire, exhmsetwithopts, exhpexpireat, exhpexpire, exhpttl, exhttl, exhver, exhsetver, exhincrby, exhincrbyfloat, exhget, exhgetwithver, exhmget, exhdel, exhlen, exhexists, exhkeys, exhvals, exhgetall, exhmgetwithver, exhsterlen, exhscan

Counts/s

exHash monitoring group: Monitoring items for exHash-related commands, such as the number of calls per second for commands like EXHSET and EXHMSET.

Redis_TairString_Monitor

cas, cad, exset, exget, exsetver, exincrby, exincrbyfloat, excas, excad

Counts/s

exString monitoring group: Monitoring items for exString-related commands, such as the number of calls per second for commands like EXSET and EXGET.

Redis_TairGis_Monitor

gisadd, gisget, gisdel, gissearch, giscontains, gisintersects, gisgetall

Counts/s

GIS monitoring group: Monitoring items for GIS-related commands, such as the number of calls per second for commands like gisadd, gisget, and gisdel.

Redis_TairBloom_Monitor

bfadd, bfmadd, bfexists, bfmexists, bfinsert, bfreserve, bfdebug

Counts/s

Bloom monitoring group: Monitoring items for Bloom-related commands, such as the number of calls per second for commands like bfreserve and bfadd.

Response elements

Element

Type

Description

Example

object

MonitorHistory

string

The monitoring information in JSON format. For more information, see Description of monitoring parameters.

Note

To improve data transfer efficiency, this operation returns only non-zero monitoring data. Data points not included in the response default to 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****

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****"
}

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.