This article is applicable to the scenario of independent deployment of obdiag. It can be executed with one click to display the tenant information of the cluster on the terminal.
Instructions for use
obdiag display scene run --scene=observer.tenant_info [options]
The options are explained below:
Option name |
Is it required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| -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. |
| --env | Yes | string | Default is empty | Additional parameters required for obdiag display, fixed style: --env tenant_name=xxxx. |
| --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 display scene run --scene=observer.tenant_info --env tenant_name=xxx \
--config db_host=xx.xx.xx.xx \
--config db_port=xxxx \
--config tenant_sys.user=root@sys \
--config tenant_sys.password=***
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 display scene run --scene=observer.tenant_info --env tenant_name=xxx
Interpretation of results
After the command is executed, the results will be displayed on the current terminal.
obdiag display scene run --scene=observer.tenant_info --env tenant_name=sys
display_scenes_run start ...
execute tasks: observer.tenant_info
+-------------+-------------+--------------+---------------+-------------+
| tenant_name | tenant_type | primary_zone | locality | tenant_role |
+-------------+-------------+--------------+---------------+-------------+
| sys | SYS | RANDOM | FULL{1}@zone1 | PRIMARY |
+-------------+-------------+--------------+---------------+-------------+
+-------------+-------+----------------+--------------+-----+-------------+---------------+-----------+---------------+----------+
| tenant_name | zone | observer | replica_type | cpu | memory_size | log_disk_size | data_size | required_size | unit_num |
+-------------+-------+----------------+--------------+-----+-------------+---------------+-----------+---------------+----------+
| sys | zone1 | xx.xx.xx.xx | FULL | 3.0 | 1G | 2G | 0.03G | 0.32G | 1 |
+-------------+-------+----------------+--------------+-----+-------------+---------------+-----------+---------------+----------+
Trace ID: 725dc5e4-89d3-11ef-9ccf-00163e01c7ce
