github.com/ncodes/nomad@v0.5.7-0.20170403112158-97adf4a74fb3/website/source/docs/http/operator.html.md (about)

     1  ---
     2  layout: "http"
     3  page_title: "HTTP API: /v1/operator/"
     4  sidebar_current: "docs-http-operator"
     5  description: >
     6    The '/v1/operator/' endpoints provides cluster-level tools for Nomad
     7    operators.
     8  ---
     9  
    10  # /v1/operator
    11  
    12  The Operator endpoint provides cluster-level tools for Nomad operators, such
    13  as interacting with the Raft subsystem. This was added in Nomad 0.5.5
    14  
    15  ~> Use this interface with extreme caution, as improper use could lead to a
    16    Nomad outage and even loss of data.
    17  
    18  See the [Outage Recovery](/guides/outage.html) guide for some examples of how
    19  these capabilities are used. For a CLI to perform these operations manually, please
    20  see the documentation for the [`nomad operator`](/docs/commands/operator-index.html)
    21  command.
    22  
    23  By default, the agent's local region is used; another region can be specified
    24  using the `?region=` query parameter.
    25  
    26  ## GET
    27  
    28  <dl>
    29    <dt>Description</dt>
    30    <dd>
    31      Query the status of a client node registered with Nomad.
    32    </dd>
    33  
    34    <dt>Method</dt>
    35    <dd>GET</dd>
    36  
    37    <dt>URL</dt>
    38    <dd>`/v1/operator/raft/configuration`</dd>
    39  
    40    <dt>Parameters</dt>
    41    <dd>
    42      <ul>
    43        <li>
    44          <span class="param">stale</span>
    45          <span class="param-flags">optional</span>
    46          If the cluster doesn't currently have a leader an error will be
    47          returned. You can use the `?stale` query parameter to read the Raft
    48          configuration from any of the Nomad servers.
    49        </li>
    50      </ul>
    51    </dd>
    52  
    53    <dt>Returns</dt>
    54    <dd>
    55  
    56      ```javascript
    57  {
    58    "Servers": [
    59      {
    60        "ID": "127.0.0.1:4647",
    61        "Node": "alice",
    62        "Address": "127.0.0.1:4647",
    63        "Leader": true,
    64        "Voter": true
    65      },
    66      {
    67        "ID": "127.0.0.2:4647",
    68        "Node": "bob",
    69        "Address": "127.0.0.2:4647",
    70        "Leader": false,
    71        "Voter": true
    72      },
    73      {
    74        "ID": "127.0.0.3:4647",
    75        "Node": "carol",
    76        "Address": "127.0.0.3:4647",
    77        "Leader": false,
    78        "Voter": true
    79      }
    80    ],
    81    "Index": 22
    82  }
    83      ```
    84  
    85    </dd>
    86  
    87    <dt>Field Reference</dt>
    88    <dd>
    89  
    90      <ul>
    91        <li>
    92          <span class="param">Servers</span>
    93          The returned `Servers` array has information about the servers in the Raft
    94          peer configuration. See the `Server` block for a description of its fields:
    95        </li>
    96        <li>
    97          <span class="param">Index</span>
    98          The `Index` value is the Raft corresponding to this configuration. The
    99          latest configuration may not yet be committed if changes are in flight.
   100        </li>
   101      </ul>
   102  
   103      `Server` Fields: 
   104      <ul>
   105        <li>
   106          <span class="param">ID</span>
   107          `ID` is the ID of the server. This is the same as the `Address` but may
   108          be upgraded to a GUID in a future version of Nomad.
   109        </li>
   110        <li>
   111          <span class="param">Node</span>
   112          `Node` is the node name of the server, as known to Nomad, or "(unknown)" if
   113          the node is stale and not known.
   114        </li>
   115        <li>
   116          <span class="param">Address</span>
   117          `Address` is the IP:port for the server.
   118        </li>
   119        <li>
   120          <span class="param">Leader</span>
   121          `Leader` is either "true" or "false" depending on the server's role in the
   122          Raft configuration.
   123        </li>
   124        <li>
   125          <span class="param">Voter</span>
   126          `Voter` is "true" or "false", indicating if the server has a vote in the Raft
   127          configuration. Future versions of Nomad may add support for non-voting servers.
   128        </li>
   129      </ul>
   130  
   131    </dd>
   132  </dl>
   133  
   134  
   135  ## DELETE
   136  
   137  <dl>
   138    <dt>Description</dt>
   139    <dd>
   140      Remove the Nomad server with given address from the Raft configuration. The
   141      return code signifies success or failure.
   142    </dd>
   143  
   144    <dt>Method</dt>
   145    <dd>DELETE</dd>
   146  
   147    <dt>URL</dt>
   148    <dd>`/v1/operator/raft/peer`</dd>
   149  
   150    <dt>Parameters</dt>
   151    <dd>
   152      <ul>
   153        <li>
   154          <span class="param">address</span>
   155          <span class="param-flags">required</span>
   156          The address specifies the server to remove and is given as an `IP:port`.
   157          The port number is usually 4647, unless configured otherwise. Nothing is
   158          required in the body of the request.
   159        </li>
   160      </ul>
   161    </dd>
   162  
   163    <dt>Returns</dt>
   164    <dd>None</dd>
   165  
   166  </dl>