github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/operator/raft/list-peers.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: operator raft list-peers'
     4  description: |
     5    Display the current Raft peer configuration.
     6  ---
     7  
     8  # Command: operator raft list-peers
     9  
    10  The `raft list-peers` command is used to display the current Raft peer
    11  configuration.
    12  
    13  See the [Outage Recovery] guide for some examples of how this command is used.
    14  For an API to perform these operations programmatically, please see the
    15  documentation for the [Operator] endpoint.
    16  
    17  ## Usage
    18  
    19  ```plaintext
    20  nomad operator raft list-peers [options]
    21  ```
    22  
    23  If ACLs are enabled, this command requires a management token.
    24  
    25  ## General Options
    26  
    27  @include 'general_options_no_namespace.mdx'
    28  
    29  ## List Peers Options
    30  
    31  - `-stale`: The stale argument defaults to "false" which means the leader
    32    provides the result. If the cluster is in an outage state without a leader, you
    33    may need to set `-stale` to "true" to get the configuration from a non-leader
    34    server.
    35  
    36  ## Examples
    37  
    38  An example output with three servers is as follows:
    39  
    40  ```shell-session
    41  $ nomad operator raft list-peers
    42  Node                   ID               Address          State     Voter
    43  nomad-server01.global  10.10.11.5:4647  10.10.11.5:4647  follower  true
    44  nomad-server02.global  10.10.11.6:4647  10.10.11.6:4647  leader    true
    45  nomad-server03.global  10.10.11.7:4647  10.10.11.7:4647  follower  true
    46  ```
    47  
    48  - `Node` is the node name of the server, as known to Nomad, or "(unknown)" if
    49    the node is stale and not known.
    50  
    51  - `ID` is the ID of the server. This is the same as the `Address` but may be
    52    upgraded to a GUID in a future version of Nomad.
    53  
    54  - `Address` is the IP:port for the server.
    55  
    56  - `State` is either "follower" or "leader" depending on the server's role in the
    57    Raft configuration.
    58  
    59  - `Voter` is "true" or "false", indicating if the server has a vote in the Raft
    60    configuration. Future versions of Nomad may add support for non-voting servers.
    61  
    62  [operator]: /api-docs/operator
    63  [outage recovery]: https://learn.hashicorp.com/tutorials/nomad/outage-recovery