v1 Catalog API
This topic provides conceptual information about version 1 (v1) of the Consul catalog API. The catalog tracks registered services and their locations for both service discovery and service mesh use cases.
For more information about the information returned when querying the catalog, including filtering options when querying the catalog for a list of nodes, services, or gateways, refer to the /catalog
endpoint reference in the HTTP API documentation.
Introduction
Consul tracks information about registered services through its Catalog API. This API records user-defined information about the external services, such as their partitions and required health checks. It also records information that Consul assigns for its own operations, such as an ID for each service instance and the Raft indices when the instance is registered and modified.
Consul uses v1 of the Catalog API by default. Consul v1.17.0 introduces a second version of the Catalog API for testing and development purposes. The catalog APIs cannot run concurrently in a Consul deployment. There is no migration path between catalog versions at this time. For more information, refer to Consul v2 Catalog API.
Catalog structure
When Consul registers a service instance using the v1 catalog API, it records the following information about each instance:
v1 Catalog field | Description | Source |
---|---|---|
ID | A unique identifier for a service instance. | Computed by Consul |
Node | The connection point where the service is available. | Computed by Consul |
Address | The address of the node where the service instance is running. | Computed by Consul |
Tagged Addresses | User-defined metadata about addresses. | Defined by user |
NodeMeta | User-defined metadata about the node. | Defined by user |
Datacenter | The name of the datacenter the service is registered in. | Defined by user |
Service | The name of the service Consul registers the service instance under. | Defined by user |
Agent Check | The health status of service last reported by the Consul agent. | Computed by Consul |
Health Checks | The health checks defined for the service. Refer to define health checks for more information. | Defined by user |
Partition | The name of the admin partition the service is registered in. Refer to admin partitions for more information. | Defined by user |
Locality | Region and availability zone of the service. Refer to locality for more information. | Defined by user |
Depending on the configuration entries or custom resource definitions you apply to your Consul installation, additional information such as proxy default behavior is automatically recorded to the catalog for services. You can return this information using the /catalog
HTTP API endpoint.