tiup cluster check 不了,总是出现tiup的help的提示

[root@db ~]# tiup cluster check topology.yaml --apply --user root [-p] [-i /home/root/.ssh/gcp_rsa]
Starting component cluster: /root/.tiup/components/cluster/v1.8.2/tiup-cluster check topology.yaml --apply --user root [-p] [-i /home/root/.ssh/gcp_rsa]
Perform preflight checks for the cluster. By default, it checks deploy servers
before a cluster is deployed, the input is the topology.yaml for the cluster.
If ‘–cluster’ is set, it will perform checks for an existing cluster, the input
is the cluster name. Some checks are ignore in this mode, such as port and dir
conflict checks with other clusters

Usage:
tiup cluster check <topology.yml | cluster-name> [flags]

Flags:
–api-timeout uint Timeout in seconds when querying PD APIs. (default 10)
–apply Try to fix failed checks
–cluster Check existing cluster, the input is a cluster name.
–enable-cpu Enable CPU thread count check
–enable-disk Enable disk IO (fio) check
–enable-mem Enable memory size check
-h, --help help for check
-i, --identity_file string The path of the SSH identity file. If specified, public key authentication will be used. (default “/root/.ssh/id_rsa”)
-N, --node strings Only check specified nodes
-p, --password Use password of target hosts. If specified, password authentication will be used.
-R, --role strings Only check specified roles
-u, --user string The user name to login via SSH. The user must has root (or sudo) privilege. (default “root”)

Global Flags:
-c, --concurrency int max number of parallel tasks allowed (default 5)
–format string (EXPERIMENTAL) The format of output, available values are [default, json] (default “default”)
–ssh string (EXPERIMENTAL) The executor type: ‘builtin’, ‘system’, ‘none’.
–ssh-timeout uint Timeout in seconds to connect host via SSH, ignored for operations that don’t need an SSH connection. (default 5)
–wait-timeout uint Timeout in seconds to wait for an operation to complete, ignored for operations that don’t fit. (default 120)
-y, --yes Skip all confirmations and assumes ‘yes’

[root@db ~]# tiup --version
1.8.2 tiup
Go Version: go1.17.5
Git Ref: v1.8.2
GitHash: a2912cf0470d651ce724e6c4e79871ec772abe38

topology.yaml
global:
user: “tidb”
ssh_port: 22
deploy_dir: “/tidb-deploy”
data_dir: “/tidb-data”
server_configs: {}
pd_servers:

  • host: 192.168.137.161
    name: “pd1”
  • host: 192.168.137.68
    name: “pd2”
  • host: 192.168.137.159
    name: “pd3”
    tidb_servers:
  • host: 192.168.137.43
    tikv_servers:
  • host: 192.168.137.238
  • host: 192.168.137.224
  • host: 192.168.137.86
    monitoring_servers:
  • host: 192.168.137.43
    grafana_servers:
  • host: 192.168.137.43
    alertmanager_servers:
  • host: 192.168.137.43

这个就是原始命令吗

如果你需要使用-p和-i参数,把中括号去掉,这里的[ ]应该是可选的意思

2 个赞

谢谢. 解决 了 [ ] 这个是可选项…

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。