首批通过分布式安全可靠测评,为关键业务系统打造
集群概览信息洞察
更新时间:2026-04-13 17:11:17
本文适用于独立部署 obdiag 的场景,可以一键执行将集群的基本信息在终端显示。
使用说明
obdiag display scene run --scene=observer.cluster_info [options]
选项说明如下:
| 选项名 | 是否必选 | 数据类型 | 默认值 | 说明 |
|---|---|---|---|---|
| -c | 否 | string | ~/.obdiag/config.yml |
配置文件路径。 |
| --inner_config | 否 | string | 默认为空 | obdiag 自用的配置。 |
| --config | 否 | string | 默认为空 | 需被 obdiag 诊断的集群的配置,固定样式:--config key1=value1 --config key2=value2。 |
使用示例
方式一:无配置文件使用(开箱即用)
说明
本节命令中使用的详细配置介绍可参见 obdiag 配置。
obdiag display scene run --scene=observer.cluster_info \
--config db_host=xx.xx.xx.xx \
--config db_port=xxxx \
--config tenant_sys.user=root@sys \
--config tenant_sys.password=***
方式二:有配置文件使用
需要确保已经在 obdiag 配置文件 config.yml 中配置好需要收集节点的登录信息。相关的详细配置介绍,参见 obdiag 配置。
obdiag display scene run --scene=observer.cluster_info
结果解读
命令执行后在当前终端会显示结果,示例如下:
$ obdiag display scene run --scene=observer.cluster_info
...
+-----------------------+--------------------------+
| stat_name | value |
+-----------------------+--------------------------+
| cluster_name | obcluster |
| cluster_id | 1 |
| version | 4.2.2.0 |
| observers | 1 |
| zones | 1 |
| tenants | 3 |
| rs_list | xx.xx.xx.xx:2882:2881 |
| config_url | |
| memory_limit | 24.00G |
| data_disk_allocated | 56.00G |
| cpu_total | 16 |
| cpu_assigned | 12 |
| cpu_assinged_per | 75% |
| memory_total | 20.00G |
| memory_assigned | 19.00G |
| memory_assigned_per | 95.00% |
| log_disk_total | 84.00G |
| log_disk_assigned | 8.00G |
| log_disk_assigned_per | 10.00% |
| log_disk_in_use | 6.50G |
| log_disk_in_use_per | 81.00% |
| data_disk_total | 56.00G |
| data_disk_in_use | 23.69G |
| data_disk_in_use_per | 42.00% |
+-----------------------+--------------------------+
Trace ID: f1b0206e-8878-11ef-a52e-00163e01c7ce