Usage Operator HTTP API
The /operator/usage
endpoint returns usage information about the number of
services, service instances and mesh-enabled service instances by datacenter.
Method | Path | Produces |
---|---|---|
GET | /operator/usage | application/json |
The table below shows this endpoint's support for blocking queries, consistency modes, agent caching, and required ACLs.
Blocking Queries | Consistency Modes | Agent Caching | ACL Required |
---|---|---|---|
YES | all | none | operator:read |
The corresponding CLI command is consul operator usage instances
.
Query Parameters
global
(bool: false)
- If present, usage information for all known datacenters will be returned. By default, only the local datacenter's usage information is returned.stale
(bool: false)
- If the cluster does not currently have a leader, an error will be returned. You can use the?stale
query parameter to read the Raft configuration from any of the Consul servers.
Sample Request
Sample Response
Services
is the total number of unique service names registered in the datacenter.ServiceInstances
is the total number of service instances registered in the datacenter.ConnectServiceInstances
is the total number of mesh service instances registered in the datacenter.BillableServiceInstances
is the total number of billable service instances registered in the datacenter. This is only relevant in Consul Enterprise and is the total service instance count, not including any mesh service instances or any Consul server instances.PartitionNamespaceServices
Enterprise is the total number of unique service names registered in the datacenter, by partition and namespace.PartitionNamespaceServiceInstances
Enterprise is the total number of service instances registered in the datacenter, by partition and namespace.PartitionNamespaceBillableServiceInstances
Enterprise is the total number of billable service instances registered in the datacenter, by partition and namespace.PartitionNamespaceConnectServiceInstances
Enterprise is the total number of mesh service instances registered in the datacenter, by partition and namespace.