»Consul Operator Usage
consul operator usage
operator command provides cluster-level tools for Consul operators
to view usage information, such as service and service instance counts.
Usage: consul operator usage <subcommand> [options] # ... Subcommands: instances Display service instance usage information
Corresponding HTTP API Endpoint: [GET] /v1/operator/usage
This command retrieves usage information about the number of services registered in a given datacenter. By default, the datacenter of the local agent is queried.
The table below shows this command's required ACLs. Configuration of blocking queries and agent caching are not supported from commands, but may be from the corresponding HTTP endpoint.
consul operator usage instances
The output looks like this:
$ consul operator usage instances Billable Service Instances Total: 3 dc1 Billable Service Instances: 3 Billable Services Services Service instances 2 3 Connect Services Type Service instances connect-native 0 connect-proxy 0 ingress-gateway 0 mesh-gateway 1 terminating-gateway 0
$ consul operator usage instances -all-datacenters Billable Service Instances Total: 4 dc1 Billable Service Instances: 3 dc2 Billable Service Instances: 1 Billable Services Datacenter Services Service instances dc1 2 3 dc2 1 1 Total 3 4 Connect Services Datacenter Type Service instances dc1 connect-native 0 dc1 connect-proxy 0 dc1 ingress-gateway 0 dc1 mesh-gateway 1 dc1 terminating-gateway 0 dc2 connect-native 0 dc2 connect-proxy 0 dc2 ingress-gateway 0 dc2 mesh-gateway 1 dc2 terminating-gateway 1 Total 3
-all-datacenters- Display service counts from all known datacenters. Default is
-billable- Display only billable service information. Default is
-connect- Display only Connect service information. Default is