Tablestore integrates with CloudMonitor to expose runtime status, performance metrics, and metering data for instances, data tables, secondary indexes, search indexes, and time series tables. You can also create alert rules to receive notifications when a metric crosses its threshold.
Supported metrics
Different resource types expose different metrics. For the complete metric list, see Tablestore monitoring metrics.
Metric collection may have a short delay.
Permissions
The following two permissions are required to view monitoring data or configure alert rules. For how to grant them, see RAM policy.
Tablestore full or read-only access:
AliyunOTSFullAccessorAliyunOTSReadOnlyAccess.CloudMonitor full or read-only access:
AliyunCloudMonitorFullAccessorAliyunCloudMonitorReadOnlyAccess.
View monitoring data
View monitoring data through one of the following entry points:
Tablestore console: view monitoring data for instances, data tables and indexes, and time series tables, as well as metering data for search indexes.
CloudMonitor: view instance-level and table-level monitoring data through the console, API, or SDK.
View in the Tablestore console
Instance
Log on to the Tablestore console. If needed, switch the region and resource group at the top of the page.
On the Instances, click the instance name or Instance Management, and then open the Instance Monitoring tab.
-
Select the Time Range and the metrics you want to view.
NoteThe Time Range cannot exceed 30 days.
Data table and index
Log on to the Tablestore console. If needed, switch the region and resource group at the top of the page.
On the Instances, click the instance name or Instance Management, and then on the Tables click the table name.
-
Open the Monitoring Indicators tab, then select the Table/Index, Time Range, and metrics to view.
NoteThe Time Range cannot exceed 30 days.
Time series table
Log on to the Tablestore console. If needed, switch the region and resource group at the top of the page.
On the Instances, click the instance name or Instance Management, and then on the Time Series Tables click the table name.
-
Open the Monitoring Indicators tab and select the Time Range to view.
NoteThe Time Range cannot exceed 30 days.
Search index metering
Log on to the Tablestore console. If needed, switch the region and resource group at the top of the page.
On the Instances, click the instance name or Instance Management, then on the Tables click Indexes for the target data table.
Click Index Details to view Index Meters data.
View in CloudMonitor
CloudMonitor console
Log on to the CloudMonitor console.
In the left-side navigation pane, click Dashboards, and then choose .
Select a region, then click the target instance name or Monitoring Charts.
Select a preset time range or specify a custom one. The range cannot exceed 31 days.
API
Call the CloudMonitor DescribeMetricList operation to retrieve data for a specific metric. The request parameters for Tablestore are:
|
Parameter |
Description |
|
Namespace |
Identifies the cloud service to monitor. For Tablestore, the Namespace is always |
|
MetricName |
The metric to query (for example, |
|
Dimensions |
A JSON string that identifies the instance or table to query.
|
|
StartTime and EndTime |
The time range to query. The interval is left-open and right-closed: |
|
Period |
The query granularity, in seconds. A larger |
SDK
The CloudMonitor SDK supports Java, Python, Go, and TypeScript. The following example uses the Java SDK to query the Count2xxNumber metric of data table mytable in instance myinstance over a given time range.
import com.aliyun.cms20190101.Client;
import com.aliyun.cms20190101.models.DescribeMetricListRequest;
import com.aliyun.cms20190101.models.DescribeMetricListResponse;
import com.aliyun.teaopenapi.models.Config;
import com.aliyun.teautil.models.RuntimeOptions;
public class DescribeMetricListExample {
public static Client createClient() throws Exception {
Config config = new Config()
.setAccessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"))
.setAccessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"));
// Set the CloudMonitor endpoint. It must match the region of the Tablestore instance.
config.endpoint = "metrics.cn-hangzhou.aliyuncs.com";
return new Client(config);
}
public static void main(String[] args) throws Exception {
Client client = createClient();
DescribeMetricListRequest request = new DescribeMetricListRequest()
// The Namespace for Tablestore monitoring is fixed to acs_ots_new.
.setNamespace("acs_ots_new")
// Set the name of the metric to query. For example, Count2xxNumber indicates the number of 2xx requests per second.
.setMetricName("Count2xxNumber")
// For table-level metrics, both instanceName and tableName must be specified in Dimensions.
.setDimensions("{\"instanceName\":\"myinstance\",\"tableName\":\"mytable\"}")
// The query period, in seconds.
.setPeriod("60")
// The time format can be yyyy-MM-dd HH:mm:ss or a millisecond timestamp.
.setStartTime("2026-06-22 06:00:00")
.setEndTime("2026-06-22 07:00:00");
RuntimeOptions runtime = new RuntimeOptions();
DescribeMetricListResponse response = client.describeMetricListWithOptions(request, runtime);
// Datapoints is a JSON string containing fields such as timestamp, Average, Maximum, Minimum, and Sum.
System.out.println("RequestId: " + response.body.getRequestId());
System.out.println("Datapoints: " + response.body.getDatapoints());
}
}
Configure metric alerts
After you configure alert rules for Tablestore metrics, CloudMonitor automatically sends an alert notification when a metric crosses its threshold. For configuration steps, see Create an alert rule.
A Alert Contact Group is required when you create an alert rule. Create one before you configure the rule. For details, see Create an alert contact or an alert contact group.
When you manage many cloud resources, group them by application, then create alert templates and apply them to the groups. This makes it easier to create and maintain alert rules. For details, see Apply an alert template to application groups.