Cluster 命令
1. 命令结构
bash
robust-ctl cluster [--server <addr>] [--output table|json] <subcommand>2. 子命令总览
status:查看集群状态healthy:查看健康状态config get:获取集群配置config set:设置动态配置
3. 详细命令
3.1 status
语法:
bash
robust-ctl cluster status示例:
bash
robust-ctl cluster status
robust-ctl cluster --output json status
robust-ctl cluster --server 192.168.10.15:8080 status3.2 healthy
语法:
bash
robust-ctl cluster healthy示例:
bash
robust-ctl cluster healthy
robust-ctl cluster --output json healthy3.3 config get
语法:
bash
robust-ctl cluster config get示例:
bash
robust-ctl cluster config get
robust-ctl cluster --output json config get3.4 config set
语法:
bash
robust-ctl cluster config set --config-type <TYPE> --config <JSON_STRING>参数:
--config-type:配置类型(示例:FlappingDetect)--config:配置 JSON 字符串
示例:
bash
robust-ctl cluster config set \
--config-type FlappingDetect \
--config '{"enable":true}'
robust-ctl cluster config set \
--config-type SlowSubscribe \
--config '{"enable":false}'4. 说明
config set当前为透传模型,具体字段由服务端按config-type解析。- 推荐对自动化脚本统一使用
--output json。
