github.com/outbrain/consul@v1.4.5/website/source/docs/commands/catalog/services.html.md.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: Catalog List Services"
     4  sidebar_current: "docs-commands-catalog-services"
     5  ---
     6  
     7  # Consul Catalog List Services
     8  
     9  Command: `consul catalog services`
    10  
    11  The `catalog services` command prints all known services. It can also query
    12  for services that match particular metadata or list the services that a
    13  particular node provides.
    14  
    15  ## Examples
    16  
    17  List all services:
    18  
    19  ```text
    20  $ consul catalog services
    21  consul
    22  postgresql
    23  redis
    24  ```
    25  
    26  Show all services with their tags:
    27  
    28  ```text
    29  $ consul catalog services -tags
    30  consul
    31  postgresql  leader
    32  redis       primary,v1
    33  ```
    34  
    35  List services for the node "worker-01":
    36  
    37  ```text
    38  $ consul catalog services -node=worker-01
    39  consul
    40  redis
    41  ```
    42  
    43  
    44  ## Usage
    45  
    46  Usage: `consul catalog services [options]`
    47  
    48  #### API Options
    49  
    50  <%= partial "docs/commands/http_api_options_client" %>
    51  <%= partial "docs/commands/http_api_options_server" %>
    52  
    53  #### Catalog List Nodes Options
    54  
    55  - `-node=<id or name>` - Node `id or name` for which to list services.
    56  
    57  - `-node-meta=<key=value>` - Metadata to filter nodes with the given
    58    `key=value` pairs. If specified, only services running on nodes matching the
    59    given metadata will be returned. This flag may be specified multiple times to
    60    filter on multiple sources of metadata.
    61  
    62  - `-tags` - Display each service's tags as a comma-separated list beside each
    63    service entry.