If OceanBase Diagnostic Tool (obdiag) is independently deployed, you can specify the observer.base scenario in the obdiag gather scene run command to collect basic information of a specified cluster. Note that the command collects SQL statement execution results but not logs. The information is required when you seek help in troubleshooting from the OceanBase community forum or OceanBase Technical Support.
Syntax
obdiag gather scene run --scene=observer.base [options]
The following table describes the options.
| Option | Required? | Data type | Default value | Description |
|---|---|---|---|---|
| --scene | Yes | string | Empty | The name of the scenario. You can run the obd obdiag gather scene list command to view the scenarios supported by the current version. |
| --store_dir | No | string | The current path where the command is executed | The local path where the results are stored. |
| -c | No | string | ~/.obdiag/config.yml |
The path of the configuration file. |
| --inner_config | No | string | Empty | The configurations of obdiag. |
| --config | No | string | Empty | The configurations of the cluster diagnosed by obdiag, in the format of --config key1=value1 --config key2=value2. |
Examples
Method 1: Use the command out-of-the-box without a configuration file
Note
For more information about the parameters used in the command in this section, see Configure obdiag.
# Collect basic information of a cluster
obdiag gather scene run --scene=observer.base \
--config db_host=xx.xx.xx.xx \
--config db_port=xxxx \
--config tenant_sys.user=root@sys \
--config tenant_sys.password=***
Method 2: Use the command with a configuration file
Before you run the command, make sure that you have configured the logon information of the target nodes in the config.yml configuration file of obdiag. For more information, see Configure obdiag.
# Collect basic information of a cluster
obdiag gather scene run --scene=observer.base
Results
The command generates a folder in the specified directory. A sample folder name is obdiag_gather_pack_20240808105846.
#tree
.
└── sql_result.txt # The basic information of the cluster.
Cases
When a backup issue occurs, you can run the following command to collect the information required for diagnostics. Then, you can post the information on the OceanBase community forum or send it to OceanBase Technical Support.
obdiag gather scene run --scene=observer.base \
--config db_host=xx.xx.xx.xx \
--config db_port=xxxx \
--config tenant_sys.user=root@sys \
--config tenant_sys.password=***