8ae3332165
- moved and renamed files/folders based on new structure - updated docs navigation based on new structure - moved CLI to top nav (created commands.jsx and commands-navigation.js) - updated and added redirects - updating to be consistent with standalone categories - changing "overview" link in top nav to lead to where intro was moved (docs/intro) - adding redirects for intro content - deleting old intro folders - format all data/navigation files - deleting old commands folder - reverting changes to glossary page - adjust intro navigation for removal of 'vs' paths - add helm page redirect - fix more redirects - add a missing redirect - fix broken anchor links and formatting mistakes - deleted duplicate section, added redirect, changed link - removed duplicate glossary page
68 lines
1.4 KiB
Plaintext
68 lines
1.4 KiB
Plaintext
---
|
|
layout: commands
|
|
page_title: 'Commands: Catalog List Services'
|
|
sidebar_title: services
|
|
---
|
|
|
|
# Consul Catalog List Services
|
|
|
|
Command: `consul catalog services`
|
|
|
|
The `catalog services` command prints all known services. It can also query
|
|
for services that match particular metadata or list the services that a
|
|
particular node provides.
|
|
|
|
## Examples
|
|
|
|
List all services:
|
|
|
|
```shell-session
|
|
$ consul catalog services
|
|
consul
|
|
postgresql
|
|
redis
|
|
```
|
|
|
|
Show all services with their tags:
|
|
|
|
```shell-session
|
|
$ consul catalog services -tags
|
|
consul
|
|
postgresql leader
|
|
redis primary,v1
|
|
```
|
|
|
|
List services for the node "worker-01":
|
|
|
|
```shell-session
|
|
$ consul catalog services -node=worker-01
|
|
consul
|
|
redis
|
|
```
|
|
|
|
## Usage
|
|
|
|
Usage: `consul catalog services [options]`
|
|
|
|
#### API Options
|
|
|
|
@include 'http_api_options_client.mdx'
|
|
|
|
@include 'http_api_options_server.mdx'
|
|
|
|
#### Enterprise Options
|
|
|
|
@include 'http_api_namespace_options.mdx'
|
|
|
|
#### Catalog List Nodes Options
|
|
|
|
- `-node=<id or name>` - Node `id or name` for which to list services.
|
|
|
|
- `-node-meta=<key=value>` - Metadata to filter nodes with the given
|
|
`key=value` pairs. If specified, only services running on nodes matching the
|
|
given metadata will be returned. This flag may be specified multiple times to
|
|
filter on multiple sources of metadata.
|
|
|
|
- `-tags` - Display each service's tags as a comma-separated list beside each
|
|
service entry.
|