Use this command to analyze the differences in OceanBase online cluster parameters on each observer with one click. If there are differences, a difference report will be output. Of course, it also supports the incoming of offline files to analyze the differences in cluster parameters on each observer. This is very helpful for troubleshooting problems caused by parameter differences on different observers.
Instructions for use
obdiag analyze parameter diff [option]
The options are explained below:
Option name |
Is it required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| --file | No | string | Default is empty | This parameter file must be filled in when the observer version is lower than V4.2.2, and the archive file of obdiag gather parameter executed before is passed |
| --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.
ExplanationParameters 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, please see Configuration file encryption. |
Usage example
Method 1: Use without configuration file (out of the box)
obdiag analyze parameter diff \
--config db_host=xx.xx.xx.xx \
--config db_port=xxxx \
--config tenant_sys.user=root@sys \
--config tenant_sys.password=***
# Offline pack: compare cluster parameters across observers
obdiag analyze parameter diff --file=/home/admin/gather_parameters/obcluster_parameters_20240808202546.csv
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 ~/.obdiag/config.yml. For related detailed configuration introduction, see obdiag configuration.
obdiag analyze parameter diff
# Offline pack: compare cluster parameters across observers
obdiag analyze parameter diff --file=/home/admin/gather_parameters/obcluster_parameters_20240808202546.csv
