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

     1  ---
     2  layout: docs
     3  page_title: 'Commands: service info'
     4  description: |
     5    The service info command is used to read the specified Nomad registered
     6    service by name.
     7  ---
     8  
     9  # Command: service info
    10  
    11  The `service info` command is used to read the specified Nomad registered
    12  service by name.
    13  
    14  ~> Service commands are new in Nomad 1.3.
    15  
    16  ## Usage
    17  
    18  ```plaintext
    19  nomad service info [options] <service_name>
    20  ```
    21  
    22  The `service info` command requires a single argument, a service name.
    23  
    24  When ACLs are enabled, this command requires a token with the `read-job`
    25  capability for the service's namespace.
    26  
    27  ## General Options
    28  
    29  @include 'general_options.mdx'
    30  
    31  ## Info Options
    32  
    33  - `-per-page`: How many results to show per page.
    34  
    35  - `-page-token`: Where to start pagination.
    36  
    37  - `-filter`: Specifies an expression used to filter query results.
    38  
    39  - `-json` : Output the service registrations in JSON format.
    40  
    41  - `-t` : Format and display the service registrations using a Go template.
    42  
    43  - `verbose` : Display full information.
    44  
    45  ## Examples
    46  
    47  View the information of a specific service:
    48  
    49  ```shell-session
    50  $ nomad service info example-cache-redis
    51  Job ID   Address          Tags        Node ID   Alloc ID
    52  example  127.0.0.1:22686  [db,cache]  7406e90b  5f0730ca
    53  example  127.0.0.1:25854  [db,cache]  7406e90b  a831f7f2
    54  ```
    55  
    56  View the verbose information of a specific service:
    57  
    58  ```shell-session
    59  $ nomad service info -verbose example-cache-redis
    60  ID           = _nomad-task-5f0730ca-b055-52ac-f56e-358f3f7412f6-redis-example-cache-redis-db
    61  Service Name = example-cache-redis
    62  Namespace    = default
    63  Job ID       = example
    64  Alloc ID     = 5f0730ca-b055-52ac-f56e-358f3f7412f6
    65  Node ID      = 7406e90b-de16-d118-80fe-60d0f2730cb3
    66  Datacenter   = dc1
    67  Address      = 127.0.0.1:22686
    68  Tags         = [db,cache]
    69  
    70  ID           = _nomad-task-a831f7f2-4c01-39dc-c742-f2b8ca178a49-redis-example-cache-redis-db
    71  Service Name = example-cache-redis
    72  Namespace    = default
    73  Job ID       = example
    74  Alloc ID     = a831f7f2-4c01-39dc-c742-f2b8ca178a49
    75  Node ID      = 7406e90b-de16-d118-80fe-60d0f2730cb3
    76  Datacenter   = dc1
    77  Address      = 127.0.0.1:25854
    78  Tags         = [db,cache]
    79  ```