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

     1  ---
     2  layout: docs
     3  page_title: 'Commands: operator raft logs'
     4  description: |
     5    Display Raft server state.
     6  ---
     7  
     8  # Command: operator raft logs
     9  
    10  The `raft logs` command is used to display the log entries persisted in
    11  the Nomad [data directory] in JSON format.
    12  
    13  This command requires file system permissions to access the data
    14  directory on disk. The Nomad server locks access to the data
    15  directory, so this command cannot be run on a data directory that is
    16  being used by a running Nomad server.
    17  
    18  ~> **Warning:** This is a low-level debugging tool and not subject to
    19    Nomad's usual backward compatibility guarantees.
    20  
    21  ## Usage
    22  
    23  ```plaintext
    24  nomad operator raft logs [options] <path to data dir>
    25  ```
    26  
    27  ## Examples
    28  
    29  The output of this command can be very large, so it's recommended that
    30  you redirect the output to a file for later examination with other
    31  tools.
    32  
    33  ```shell-session
    34  $ sudo nomad operator raft logs /var/nomad/data > ~/raft-logs.json
    35  $ jq . < ~/raft-logs.json
    36  ```
    37  
    38  [data directory]: /docs/configuration#data_dir