This topic describes how to trigger an inspection of a cluster by using an API. An inspection can be a basic inspection or a performance inspection.
Call the API
If a password is set, you must pass the authentication. For more information, see API hybrid encryption.
Request path
POST /api/v1/obcluster/inspection
Request parameters
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| scenario | string | Yes | basic | The inspection scenario. Valid values: basic (basic inspection) and performance (performance inspection). The value is case-insensitive. |
Response
Parameter |
Type |
Description |
|---|---|---|
| successful | bool | Indicates whether the request was successful. |
| timestamp | time.Time | The timestamp when the server completed the request. |
| duration | int | The time taken by the server to process the request, in milliseconds. |
| status | int | The HTTP status code. |
| traceId | string | The trace ID of the request. |
| data | DagDetailDTO | The details of the task DAG. For more information, see the Data structure of DagDetailDTO section below. |
| error | ApiError | The error information, which contains the following fields:
|
Data structure of DagDetailDTO:
Parameter |
Type |
Description |
|---|---|---|
| id | string | The general ID of the DAG. |
| dag_id | int | The ID of the DAG, which is the primary key stored in the OceanBase Database. |
| name | string | The name of the DAG. |
| stage | int | The current execution stage of the DAG. |
| max_stage | int | The total number of stages in the DAG. |
| state | string | The execution status of the DAG. |
| operator | string | The execution operation type of the DAG. |
| start_time | time.Time | The start time of the DAG execution. |
| end_time | time.Time | The end time of the DAG execution. |
| additional_data | map[string]any | Other data of the DAG. |
| nodes | []NodeDetailDTO | The details of all nodes in the DAG. For more information, see Get the details of a node. |
Examples
Request example
POST 10.10.10.1:2886/api/v1/obcluster/inspection
{
"scenario": "basic"
}
Response example
{
"successful": true,
"timestamp": "2025-10-14T15:14:01.277047628+08:00",
"duration": 50,
"status": 200,
"traceId": "e6f64ba7f54e7a47",
"data": {
"id": "11001",
"dag_id": 1001,
"name": "Cluster inspection",
"stage": 1,
"max_stage": 3,
"maintenance_type": 0,
"maintenance_key": "",
"state": "READY",
"operator": "RUN",
"start_time": "0001-01-01T00:00:00Z",
"end_time": "0001-01-01T00:00:00Z",
"additional_data": null,
"nodes": null
}
}
Overview
Basic inspection tasks
Basic inspection tasks focus on the stability and availability of the OceanBase cluster. They include error checks, log checks, disk checks, table checks, tenant checks, cluster checks, archive checks, network checks, and system checks. These inspection items aim to promptly identify potential issues that may lead to cluster failures or data loss, ensuring the cluster runs stably. Basic inspections cover health checks from the system level, such as kernel parameters and file system configurations, to the application level, such as deadlock detection, leader election, and memory usage.
List of basic inspection tasks
bugs.*
err_code.*
clog.*
ls.*
log.log_size
log.log_size_with_ocp
disk.data_disk_full
disk.disk_full
disk.disk_hole
disk.clog_abnormal_file
disk.sstable_abnormal_file
disk.mount_disk_full
disk.xfs_repair
table.information_schema_tables_two_data
table.auto_split_error
tenant.tenant_min_resource
tenant.writing_throttling_trigger_percentage
tenant.ddl_operation_table_size
tenant.parameters_default
tenant.tenant_locality_consistency_check
tenant.max_stale_time_for_weak_consistency
cluster.auto_increment_cache_size
cluster.datafile_next
cluster.data_path_settings
cluster.deadlocks
cluster.freeze_trigger_percentage
cluster.global_indexes_too_much
cluster.logons_check
cluster.ls_number
cluster.major
cluster.major_suspended
cluster.memory_chunk_cache_size
cluster.memory_limit_percentage
cluster.memory_limit_vs_phy_mem
cluster.memstore_limit_percentage
cluster.mod_too_large
cluster.no_leader
cluster.ob_enable_plan_cache_bad_version
cluster.ob_query_timeout
cluster.observer_not_active
cluster.observer_port
cluster.optimizer_better_inlist_costing_parmmeter
cluster.part_trans_action_max
cluster.resource_limit_max_session_num
cluster.server_permanent_offline_time
cluster.session_limit
cluster.sys_log_level
cluster.sys_obcon_health
cluster.table_history_too_many
cluster.task_opt_stat_gather_fail
cluster.tenant_locks
cluster.tenant_memory_tablet_count
cluster.tenant_number
cluster.upgrade_finished
cluster.upper_trans_version
cluster.zone_not_active
cluster.core_file_find
network.local_ip_check
network.TCP-retransmission
system.aio
system.arm_smmu
system.check_command
system.check_system_language
system.clock_source
system.clock_source_check
system.core_pattern
system.dependent_software
system.dependent_software_swapon
system.getenforce
system.instruction_set_avx
system.kernel_bad_version
system.mount_options
system.parameter
system.parameter_ip_local_port_range
system.parameter_tcp_rmem
system.parameter_tcp_wmem
system.ulimit_parameter
version.*
Performance inspection tasks
Performance inspection tasks focus on optimizing the performance and resource utilization efficiency of the OceanBase cluster. They include index optimization, query performance, compression algorithm configuration, network performance, CPU performance, and disk I/O performance. These inspection items aim to identify configuration issues or resource bottlenecks that may affect system performance, helping to optimize the cluster's running efficiency. Performance inspections cover various dimensions related to performance, such as query execution parameters, cache configurations, network latency, disk IOPS, and macroblock utilization.
List of performance inspection tasks
index.global_index_unpartitioned
cluster.autoinc_cache_refresh_interval
cluster.clog_sync_time_warn_threshold
cluster.cpu_quota_concurrency
cluster.default_compress_func
cluster.enable_lock_priority
cluster.large_query_threshold
cluster.memstore_usage
cluster.ob_enable_prepared_statement
cluster.syslog_io_bandwidth_limit
cluster.task_opt_stat
cluster.trace_log_slow_query_watermark
cpu.oversold
disk.disk_iops
tenant.tenant_threshold
network.log_easy_slow
network.network_speed
network.network_drop
network.network_speed_diff
network.network_offset
network.network_write_cond_wakeup
system.tcp_tw_reuse
system.cgroup_version
