一般我们查看 Consul ,直接通过在浏览器里输入IP + Consul 端口就能访问。但是有的时候服务器的端口是不对外开放的,这个时候我们又想查看 Consul 状态,就可以使用 consul 提供的命令行查看 。
在服务中直接输入 consul
,能够打印出提供的 Consul CLI 命令参数信息。
$ consul
Usage: consul [--version] [--help] <command> [<args>]
Available commands are:
acl Interact with Consul's ACLs
agent Runs a Consul agent
catalog Interact with the catalog
connect Interact with Consul Connect
debug Records a debugging archive for operators
event Fire a new event
exec Executes a command on Consul nodes
force-leave Forces a member of the cluster to enter the "left" state
info Provides debugging information for operators.
intention Interact with