Alibaba Cloud OceanBase
Collect Alibaba Cloud OceanBase metrics and slow query log data
Configuration¶
Install Func¶
It is recommended to activate the TrueWatch integration - extension - DataFlux Func (Automata)
If you deploy Func yourself, refer to Deploy Func Yourself
Install Scripts¶
Note: Please prepare the required Alibaba Cloud AK in advance (for simplicity, you can directly grant global read-only permissions
ReadOnlyAccess)
Metrics¶
-
Log in to the Func console, click [Script Market], enter the TrueWatch script market, and search for:
integration_alibabacloud_oceanbase_metric -
Click [Install], then enter the corresponding parameters: Alibaba Cloud AK ID, AK Secret, and account name.
-
Click [Deploy Startup Script], the system will automatically create the
Startupscript set and configure the corresponding startup script. -
After enabling, you can see the corresponding automatic trigger configuration in "Manage / Automatic Trigger Configuration". Click [Execute] to immediately execute it once without waiting for the scheduled time. After a while, you can check the execution task records and corresponding logs.
Slow Query Logs¶
-
Log in to the Func console, click [Script Market], enter the TrueWatch script market, and search for:
integration_alibabacloud_oceanbase_slowlog -
Click [Install], then enter the corresponding parameters: Alibaba Cloud AK ID, AK Secret, and account name.
-
Click [Deploy Startup Script], the system will automatically create the
Startupscript set and configure the corresponding startup script. -
After enabling, you can see the corresponding automatic trigger configuration in "Manage / Automatic Trigger Configuration". Click [Execute] to immediately execute it once without waiting for the scheduled time. After a while, you can check the execution task records and corresponding logs.
Verification¶
- In "Manage / Automatic Trigger Configuration", confirm whether the corresponding task has the automatic trigger configuration, and check the task records and logs for any exceptions
- In TrueWatch, check if the asset information exists in "Infrastructure / Custom"
- In TrueWatch, check if the corresponding monitoring data exists in "Metrics"
Metrics¶
Alibaba Cloud OceanBase metrics are under the aliyun_oceanbase_metric Measurement. Below are the metric details
| Metric Name | Description | Unit |
|---|---|---|
| active_memstore_used | Current active MemStore used memory | bytes |
| active_session | Active sessions | count |
| all_session | Total sessions | count |
| block_cache_hit_ratio | Block Cache hit ratio | % |
| block_cache_req_total | Total Block Cache requests | count |
| block_cache_size | Block Cache size | bytes |
| bloom_filter_cache_hit_ratio | Bloom Filter Cache hit ratio | % |
| bloom_filter_cache_req_total | Total Bloom Filter Cache requests | count |
| bloom_filter_cache_size | Bloom Filter Cache size | bytes |
| client_connections | Client connections | count |
| clog_cache_hit_ratio | Clog Cache hit ratio | % |
| clog_cache_req_total | Total Clog Cache requests | count |
| clog_cache_size | Clog Cache size | bytes |
| clog_trans_log_total_size | Total transaction log size | bytes |
| cpu_percent | CPU usage | % |
| io_byte | Total IO bytes | bytes |
| io_count | Total IO count | count |
| io_read | Total read IO bytes | bytes |
| io_read_byte | Read IO bytes | bytes |
| io_read_count | Read IO count | count |
| io_read_rt | Read IO average response time | ms |
| io_read_size | Read IO average size | bytes |
| io_rt | IO average response time | ms |
| io_size | IO average size | bytes |
| io_write | Total write IO bytes | bytes |
| io_write_byte | Write IO bytes | bytes |
| io_write_count | Write IO count | count |
| io_write_rt | Write IO average response time | ms |
| io_write_size | Write IO average size | bytes |
| load_1 | 1-minute system load | none |
| location_cache_hit_ratio | Location Cache hit ratio | % |
| location_cache_req_total | Total Location Cache requests | count |
| major_freeze_trigger | Major Freeze trigger count | count |
| memory_buffers | Buffer memory | bytes |
| memory_free | Free memory | bytes |
| memory_percent | Memory usage | % |
| memstore_limit | MemStore limit | bytes |
| memstore_percent | MemStore usage | % |
| memstore_write_lock_fail_count | MemStore write lock failure count | count |
| memstore_write_lock_succ_count | MemStore write lock success count | count |
| net_recv | Network received bytes | bytes |
| net_send | Network sent bytes | bytes |
| net_throughput | Network throughput | bytes/second |
| ob_background_waitevent_count | Background wait event count | count |
| ob_clog_disk_percent | Clog disk usage | % |
| ob_clog_io | Clog IO count | count |
| ob_clog_io_byte | Clog IO bytes | bytes |
| ob_clog_io_time | Clog IO time | ms |
| ob_clog_io_util | Clog IO utilization | % |
| ob_clog_ls_max_replayed_scn | Maximum replayed SCN | none |
| ob_cpu_percent | OB CPU usage | % |
| ob_data_disk_percent | Data disk usage | % |
| ob_data_disk_used_size | Data disk used size | bytes |
| ob_data_io | Data IO count | count |
| ob_data_io_byte | Data IO bytes | bytes |
| ob_data_io_time | Data IO time | ms |
| ob_data_io_util | Data IO utilization | % |
| ob_data_required_size | Data required size | bytes |
| ob_host_real_time_iops | Real-time IOPS | count/second |
| ob_host_real_time_throughput | Real-time throughput | bytes/second |
| ob_no_idle_waiting_time | Non-idle waiting time | ms |
| ob_process_exists | OB process exists | boolean |
| ob_sql_event | SQL event count | count |
| ob_sql_event_in_parse | SQL parsing event count | count |
| ob_sql_event_in_pl_parse | PL parsing event count | count |
| ob_sql_event_in_plan_cache | Plan Cache event count | count |
| ob_sql_event_in_px_execution | Parallel execution event count | count |
| ob_sql_event_in_sequence_load | Sequence loading event count | count |
| ob_sql_event_in_sql_execution | SQL execution event count | count |
| ob_sql_event_in_sql_optimize | SQL optimization event count | count |
| ob_tenant_data_size | Tenant data size | bytes |
| ob_tenant_disk_used_percentage | Tenant disk usage | % |
| ob_tenant_log_disk_total_bytes | Tenant log disk total size | bytes |
| ob_tenant_log_disk_used_bytes | Tenant log disk used size | bytes |
| ob_tenant_memory_percent | Tenant memory usage | % |
| ob_tenant_server_data_size | Tenant data size on server | bytes |
| ob_tenant_server_required_size | Tenant required size on server | bytes |
| ob_waiteevent_count | Wait event count | count |
| ob_worktime | Work time | ms |
| opened_cursors_count | Opened cursors count | count |
| plan_cache_hit_ratio | Plan Cache hit ratio | % |
| plan_cache_size | Plan Cache size | bytes |
| qps | Queries per second | count/second |
| qps_rt | Query average response time | ms |
| request_dequeue_count | Request dequeue count | count |
| request_enqueue_count | Request enqueue count | count |
| request_queue_time | Request queue time | ms |
| row_cache_hit_ratio | Row Cache hit ratio | % |
| row_cache_req_total | Total Row Cache requests | count |
| row_cache_size | Row Cache size | bytes |
| rpc_packet_in | Incoming RPC packet count | packets |
| rpc_packet_in_rt | Incoming RPC packet average response time | ms |
| rpc_packet_out | Outgoing RPC packet count | packets |
| rpc_packet_out_rt | Outgoing RPC packet average response time | ms |
| server_connections | Server connections | count |
| slow_sql_count | Slow SQL count | count |
| sql_all_count | Total SQL count | count |
| sql_all_rt | SQL average response time | ms |
| sql_all_rt_p_90 | SQL 90th percentile response time | ms |
| sql_all_rt_p_95 | SQL 95th percentile response time | ms |
| sql_all_rt_p_99 | SQL 99th percentile response time | ms |
| sql_delete_count | DELETE statement count | count |
| sql_distributed_count | Distributed SQL count | count |
| sql_insert_count | INSERT statement count | count |
| sql_insert_rt | INSERT average response time | ms |
| sql_insert_rt_p_90 | INSERT 90th percentile response time | ms |
| sql_insert_rt_p_95 | INSERT 95th percentile response time | ms |
| sql_insert_rt_p_99 | INSERT 99th percentile response time | ms |
| sql_local_count | Local SQL count | count |
| sql_other_count | Other SQL count | count |
| sql_other_rt | Other SQL average response time | ms |
| sql_other_rt_p_90 | Other SQL 90th percentile response time | ms |
| sql_other_rt_p_95 | Other SQL 95th percentile response time | ms |
| sql_other_rt_p_99 | Other SQL 99th percentile response time | ms |
| sql_remote_count | Remote SQL count | count |
| sql_replace_count | REPLACE statement count | count |
| sql_select_count | SELECT statement count | count |
| sql_select_rt | SELECT average response time | ms |
| sql_select_rt_p_90 | SELECT 90th percentile response time | ms |
| sql_select_rt_p_95 | SELECT 95th percentile response time | ms |
| sql_select_rt_p_99 | SELECT 99th percentile response time | ms |
| sql_update_count | UPDATE statement count | count |
| sql_update_rt | UPDATE average response time | ms |
| system_event_commit_count | Commit system event count | count |
| system_event_commit_waites | Commit wait event count | count |
| system_event_concurrency_count | Concurrency system event count | count |
| system_event_concurrency_waites | Concurrency wait event count | count |
| system_event_configuration_count | Configuration system event count | count |
| system_event_configuration_time_waites | Configuration wait event count | count |
| system_event_network_count | Network system event count | count |
| system_event_network_waites | Network wait event count | count |
| system_event_other_count | Other system event count | count |
| system_event_other_time_waites | Other wait event count | count |
| system_event_system_io_count | System IO event count | count |
| system_event_system_io_waites | System IO wait event count | count |
| system_event_user_io_count | User IO event count | count |
| system_event_user_io_waites | User IO wait event count | count |
| total_memstore_used | Total MemStore usage | bytes |
| tps | Transactions per second | count/second |
| trans_commit_log_count | Transaction commit log count | count |
| trans_commit_log_sync_rt | Transaction commit log sync time | ms |
| transaction_commit_count | Transaction commit count | count |
| transaction_commit_rt | Transaction commit time | ms |
| transaction_count | Total transaction count | count |
| transaction_multi_partition_count | Cross-partition transaction count | count |
| transaction_partition_count | Transaction partition count | count |
| transaction_rollback_count | Transaction rollback count | count |
| transaction_rollback_rt | Transaction rollback time | ms |
| transaction_rt | Transaction average response time | ms |
| transaction_single_partition_count | Single-partition transaction count | count |
| transaction_timeout_count | Transaction timeout count | count |
| uptime | Uptime | seconds |
| wait_event_count | Total wait event count | count |
| wait_event_rt | Wait event average time | ms |
Objects¶
The collected Alibaba Cloud OceanBase object data structure can be seen in "Infrastructure - Custom". Currently, there are mainly two types of object data:
- aliyun_oceanbase: Alibaba Cloud OceanBase instance object
- aliyun_oceanbase_tenant: Tenant object under the Alibaba Cloud OceanBase instance
aliyun_oceanbase¶
{
"fields": {
"Cpu": 4,
"CpuArchitecture": "X86",
"CreateTime": "2025-09-26T02:33:47Z",
"DataDiskAutoScaleConfig": "{\"AutoScale\": false, \"MaxDiskSize\": 64000.0}",
"DeployMode": "1-1-1",
"DeployType": "single",
"DiskSize": 50,
"ExpireTime": "2125-09-26T16:00:00Z",
"InstanceClass": "4C16G",
"InstanceId": "ob73ypcm3mtr28",
"InstanceName": "ob_0926",
"InstanceRole": "NORMAL",
"InstanceType": "K8s_DEDICATED",
"Mem": 16,
"PayType": "POSTPAY",
"message": "...."
...
},
"measurement": "aliyun_oceanbase",
"tags": {
"ClusterId": "ob73ypcm3mtr28",
"ClusterName": "ob_0926",
"ClusterRole": "NORMAL",
"ClusterType": "K8s_DEDICATED",
"ProxyClusterId": "proxy-73yrq8mzxxx",
"RegionId": "cn-shenzhen",
"ResourceGroupId": "rg-aekzsli74qdxxxx",
"name": "ob73ypcm3mtr28"
}
}
aliyun_oceanbase_tenant¶
{
"fields": {
"Cpu": 1,
"CreateTime": "2025-09-26T03:34:31Z",
"Mem": 4,
"Status": "ONLINE",
"TenantMode": "MySQL",
"message": "...."
},
"measurement": "aliyun_oceanbase_tenant",
"tags": {
"ClusterId": "ob73ypcm3mtr28",
"ClusterName": "ob_0926",
"ClusterRole": "NORMAL",
"ClusterType": "K8s_DEDICATED",
"PrimaryZone": "cn-shenzhen-d",
"ProxyClusterId": "proxy-73yrq8mzwddd",
"RegionId": "cn-shenzhen",
"ResourceGroupId": "rg-aekzsli74qdxxxx",
"TenantId": "t73yursgglxeo",
"TenantName": "mall",
"name": "t73yursgglxeo"
}
}