If OceanBase Diagnostic Tool (obdiag) is independently deployed, you can run this command to collect the parameters of a cluster and store the information in a CSV file for parameter comparison and archiving.
If your OceanBase cluster is deployed by using OceanBase Deployer (obd), you can run obdiag commands on obd to collect diagnostic information of the cluster. For more information about the commands, see obdiag commands.
Syntax
obdiag gather parameter [options]
The following table describes the options.
| Option | Required? | Data type | Default value | Description |
|---|---|---|---|---|
| --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.
NoteFor information about the parameters supported by this option, see Configure obdiag. |
Examples
Method 1: Use the command out-of-the-box without a configuration file
obdiag gather parameter \
--config db_host=xx.xx.xx.xx \
--config db_port=xxxx \
--config tenant_sys.user=root@sys \
--config tenant_sys.password=***
The output is as follows:
gather_parameters start ...
Gather parameters finished. For more details, please run cmd 'cat /home/admin/gather_parameters/obcluster_parameters_20240808202546.csv'
Trace ID: 565b2656-5581-11ef-914d-a6e6206c49dc
If you want to view detailed obdiag logs, please run: obdiag display-trace 565b2656-5581-11ef-914d-a6e6206c49dc
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.
obdiag gather parameter
Results
The command generates a parameter report in the specified directory. A sample file path is ./gather_parameters/obcluster_parameters_20240808202546.csv.