This article applies to the scenario of independent deployment of obdiag. Use the obdiag gather parameter command to collect cluster parameter information with one click and store it in a csv file, which can be used for parameter comparison and archiving.
If it is a cluster deployed by obd, you can directly collect information on the selected cluster through the obd side diagnostic command group.
Instructions for use
obdiag gather parameter [options]
The options are explained below:
Option name |
Is it required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| --store_dir | No | string | Defaults to the current path where the command is executed | The local path where the results are stored. |
| -c | No | string | ~/.obdiag/config.yml |
Configuration file path. |
| --inner_config | No | string | Default is empty | obdiag's own configuration. |
| --config | No | string | Default is empty | Configuration of the cluster to be diagnosed by obdiag, fixed style: --config key1=value1 --config key2=value2.
ExplanationThe parameters that support configuration through this option can be found in obdiag configuration. |
| --config_password | No | string | Default is empty | obdiag When using an encrypted configuration file, you need to pass in the corresponding password through this option.
ExplanationFor details, see Configuration file encryption. |
Usage example
Method 1: Use without configuration file (out of the box)
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 with configuration file
You need to ensure that the login information of the node to be collected has been configured in the obdiag configuration file config.yml. For related detailed configuration introduction, see obdiag configuration.
obdiag gather parameter
Interpretation of results
After the command is executed, a parameter report file will be generated in the specified directory. The file format is: ./gather_parameters/obcluster_parameters_20240808202546.csv
