2014-02-08 00:41:03 +00:00
|
|
|
---
|
|
|
|
layout: "docs"
|
|
|
|
page_title: "Commands: Members"
|
|
|
|
sidebar_current: "docs-commands-members"
|
|
|
|
---
|
|
|
|
|
2014-02-19 01:32:13 +00:00
|
|
|
# Consul Members
|
2014-02-08 00:41:03 +00:00
|
|
|
|
2014-02-19 01:32:13 +00:00
|
|
|
Command: `consul members`
|
2014-02-08 00:41:03 +00:00
|
|
|
|
2014-02-19 01:32:13 +00:00
|
|
|
The members command outputs the current list of members that a Consul
|
2014-02-08 00:41:03 +00:00
|
|
|
agent knows about, along with their state. The state of a node can only
|
2014-02-19 01:32:13 +00:00
|
|
|
be "alive", "left", or "failed".
|
2014-02-08 00:41:03 +00:00
|
|
|
|
2014-02-19 01:32:13 +00:00
|
|
|
Nodes in the "failed" state are still listed because Consul attempts to
|
2014-02-08 00:41:03 +00:00
|
|
|
reconnect with failed nodes for a certain amount of time in the case
|
|
|
|
that the failure is actually just a network partition.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2014-02-19 01:32:13 +00:00
|
|
|
Usage: `consul members [options]`
|
2014-02-08 00:41:03 +00:00
|
|
|
|
|
|
|
The command-line flags are all optional. The list of available flags are:
|
|
|
|
|
2014-06-06 23:00:02 +00:00
|
|
|
* `-detailed` - If provided, output shows more detailed information
|
|
|
|
about each node.
|
2014-02-08 00:41:03 +00:00
|
|
|
|
|
|
|
* `-rpc-addr` - Address to the RPC server of the agent you want to contact
|
|
|
|
to send this command. If this isn't specified, the command will contact
|
2014-02-19 01:32:13 +00:00
|
|
|
"127.0.0.1:8400 " which is the default RPC address of a Consul agent.
|
2014-02-08 00:41:03 +00:00
|
|
|
|
|
|
|
* `-status` - If provided, output is filtered to only nodes matching
|
|
|
|
the regular expression for status
|
|
|
|
|
2014-02-19 01:32:13 +00:00
|
|
|
* `-wan` - For agents in Server mode, this will return the list of nodes
|
|
|
|
in the WAN gossip pool. These are generally all the server nodes in
|
|
|
|
each datacenter.
|
|
|
|
|