Tablestore publishes system-level operational, performance, and metering metrics to CloudMonitor. Use these metrics to track requests, analyze usage, monitor trends, and diagnose issues.
Prerequisites
If you use a RAM user to view Tablestore monitoring data, the following permissions are required:
-
The RAM user is granted the management permissions for Tablestore (
AliyunOTSFullAccess) or the read-only permissions for Tablestore (AliyunOTSReadOnlyAccess). For more information, see Manage RAM user permissions. -
The RAM user is granted the management permissions for CloudMonitor (
AliyunCloudMonitorFullAccess) or the read-only permissions for CloudMonitor (AliyunCloudMonitorReadOnlyAccess). For more information, see Manage RAM user permissions.
You can also create a custom policy for fine-grained permission control. For more information, see Create a custom policy.
Usage notes
-
The available monitoring metrics vary depending on the resource type. For more information about the metrics, see Metric descriptions.
-
Monitoring data aggregation may be delayed.
View monitoring data in the CloudMonitor console
CloudMonitor automatically discovers resources across all Alibaba Cloud services in your account. In the CloudMonitor console, view metrics such as VCU, InstanceCU, RequestCount, and InstanceNet for your Tablestore instances.
Log on to the CloudMonitor console.
In the left-side navigation pane, click Dashboards, and then choose .
Select the region, and then click the instance name or Monitoring Charts.
Select a preset time range or specify a custom date range. The range cannot exceed 31 days.
View monitoring data by calling the CloudMonitor API
Call the CloudMonitor DescribeMetricList operation to retrieve monitoring data for a specific metric, such as InstanceCU for an instance or ReadCU for a data table.
For CloudMonitor SDK examples, see SDK Reference.
Namespace
The Namespace parameter identifies the Alibaba Cloud service to monitor. For Tablestore, set Namespace to acs_ots_new.
The following Java SDK example sets the namespace to Tablestore:
DescribeMetricListRequest request = new DescribeMetricListRequest();
request.setNamespace("acs_ots_new");StartTime and EndTime
The StartTime and EndTime parameters define the time range to query. CloudMonitor uses a left-open, right-closed interval (StartTime, EndTime]: data points at EndTime are included, and data points at StartTime are excluded.
The interval between StartTime and EndTime cannot exceed 31 days, and data older than 31 days is not retained.
The following Java SDK example sets the time range:
// Set the end time of the monitoring data.
request.setEndTime("2022-06-13 11:23:00");
// Set the start time of the monitoring data.
request.setStartTime("2022-06-13 10:23:00");Alternatively, specify the time range as a millisecond timestamp:
// Set the end time of the monitoring data, in milliseconds.
request.setEndTime("1655090580000");
// Set the start time of the monitoring data, in milliseconds.
request.setStartTime("1655086860000");Dimensions
The Dimensions parameter identifies the instance or table to query. Pass Dimensions as a JSON string, for example {"userId":"1234567890****","region":"cn-hangzhou","instanceName":"myinstance","tableName":"mytable"}.
The following Java SDK example queries metrics at the instance level:
// Specify the name of the instance to query.
request.setDimensions("{\"userId\":\"1234567890****\",\"region\":\"cn-hangzhou\",\"instanceName\":\"myinstance\"}");To query metrics at the table level, include the tableName key in Dimensions:
// Specify the name of the table to query.
request.setDimensions("{\"userId\":\"1234567890****\",\"region\":\"cn-hangzhou\",\"instanceName\":\"myinstance\",\"tableName\":\"mytable\"}");The value of the operation key is the API name. For more information, see API overview.
To query metrics for a specific operation at the instance or table level, include the operation key in Dimensions. The following Java SDK example queries metrics for the PutRow operation on a table:
// Specify the table and operation to query.
request.setDimensions("{\"userId\":\"1234567890****\",\"region\":\"cn-hangzhou\",\"instanceName\":\"myinstance\",\"tableName\":\"mytable\",\"operation\":\"PutRow\"}");Period
The Period parameter sets the query period for a metric: 3600 seconds for metering metrics, and 60 seconds for all other metrics. For metric descriptions, see Metric descriptions.
Metric
The Metric parameter specifies the metric to query.
The following Java SDK example sets the metric name:
// Set the metric name. This example uses the InstanceCount2xxNumber metric.
request.setMetric("InstanceCount2xxNumber");The following table lists the available metrics.
Resource type | Metric | Dimensions | Description |
Instance | InstanceCount2xxNumber | userId, region, instanceName, operation | Number of 2xx requests. Unit: count/second. |
InstanceCount429Number | userId, region, instanceName, operation | Number of 429 requests. Unit: count/second. | |
InstanceCount4xxNumber | userId, region, instanceName, operation | Number of 4xx requests. Unit: count/second. | |
InstanceCount5xxNumber | userId, region, instanceName, operation | Number of 5xx requests. Unit: count/second. | |
InstanceExtranetIn | userId, region, instanceName, operation | Inbound traffic over the Internet. Unit: bytes/second. | |
InstanceExtranetOut | userId, region, instanceName, operation | Outbound traffic over the Internet. Unit: bytes/second. | |
InstanceFailRowCount | userId, region, instanceName, operation | Number of failed rows in the operation. Unit: rows/second. | |
InstanceFreeExtranetOut | userId, region, instanceName, operation | Free outbound traffic over the Internet. Unit: bytes/second. | |
InstanceFreeReadCU | userId, region, instanceName, operation | Free read CUs. Unit: CU/second. | |
InstanceFreeWriteCU | userId, region, instanceName, operation | Free write CUs. Unit: CU/second. | |
InstanceIntranetIn | userId, region, instanceName, operation | Inbound traffic over the internal network. Unit: bytes/second. | |
InstanceIntranetOut | userId, region, instanceName, operation | Outbound traffic over the internal network. Unit: bytes/second. | |
InstanceOverReadCU | userId, region, instanceName, operation | Over-quota read CUs of the instance. Unit: CU/second. | |
InstanceOverWriteCU | userId, region, instanceName, operation | Over-quota write CUs of the instance. Unit: CU/second. | |
InstanceReadCU | userId, region, instanceName, operation | Read CUs consumed by instance operations. Unit: CU/second. | |
InstanceRequestNumber | userId, region, instanceName, operation | Total requests. Unit: count/second. | |
InstanceRowCount | userId, region, instanceName, operation | Total number of rows processed by operations. Unit: rows/second. | |
InstanceVCU | userId, region, instanceName | VCUs of the instance. Unit: count/second. | |
Table (including data tables and secondary index tables) | AverageLatency | userId, region, instanceName, tableName, operation | Average latency of the operation. Unit: microseconds (μs). |
Count2xxNumber | userId, region, instanceName, tableName, operation | Number of 2xx requests. Unit: count/second. | |
Count429Number | userId, region, instanceName, tableName, operation | Number of 429 requests. Unit: count/second. | |
Count4xxNumber | userId, region, instanceName, tableName, operation | Number of 4xx requests. Unit: count/second. | |
Count5xxNumber | userId, region, instanceName, tableName, operation | Number of 5xx requests. Unit: count/second. | |
ExtranetIn | userId, region, instanceName, tableName, operation | Inbound traffic over the Internet. Unit: bytes/second. | |
ExtranetOut | userId, region, instanceName, tableName, operation | Outbound traffic over the Internet. Unit: bytes/second. | |
FailRowCount | userId, region, instanceName, tableName, operation | Number of failed rows in the operation. Unit: rows/second. | |
FreeExtranetOut | userId, region, instanceName, tableName, operation | Free outbound traffic over the Internet. Unit: bytes/second. | |
StorageSize | userId, region, instanceName, tableName, operation | Data storage size of the table. Unit: bytes. | |
FreeReadCU | userId, region, instanceName, tableName, operation | Free read CUs. Unit: CU/second. | |
FreeWriteCU | userId, region, instanceName, tableName, operation | Free write CUs. Unit: CU/second. | |
IntranetIn | userId, region, instanceName, tableName, operation | Inbound traffic over the internal network. Unit: bytes/second. | |
IntranetOut | userId, region, instanceName, tableName, operation | Outbound traffic over the internal network. Unit: bytes/second. | |
OverReadCU | userId, region, instanceName, tableName, operation | Over-quota read CUs of the table. Unit: CU/second. | |
OverWriteCU | userId, region, instanceName, tableName, operation | Over-quota write CUs of the table. Unit: CU/second. | |
ReadCU | userId, region, instanceName, tableName, operation | Number of read CUs consumed by operations. Unit: CU/second. | |
RequestNumber | userId, region, instanceName, tableName, operation | Total requests. Unit: count/second. | |
RowCount | userId, region, instanceName, tableName, operation | Total number of rows processed by operations. Unit: rows/second. | |
WriteCU | userId, region, instanceName, tableName, operation | Write CUs consumed by operations. Unit: CU/second. | |
Time series table | StorageSize | userId, region, instanceName, tableName, operation | Data storage size of the table. Unit: bytes. |