Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
ChrisAubuchon edited this page Jul 24, 2015 · 10 revisions

Wiki

consul-cli is a command line interface to the Consul HTTP API

See one of:

Common Command Line Options

  • --consul
    Address of the Consul agent in the form hostname:port. The default is 127.0.0.1:8500. Can also be set with the environment variable CONSUL_HTTP_ADDR

  • --ssl
    Use HTTPS when connecting to the Consul agent. The default is false. Can also be set with the environment variable CONSUL_HTTP_SSL

  • --ssl-verify
    Verify certificates when connecting via SSL. The default is true. Can also be set with the environment variable CONSUL_HTTP_SSL_VERIFY

  • --ssl-cert
    Path to an SSL client certificate to use to authenticate to the consul server. Useful if the consul server "verify_incoming" option is set.

  • --ssl-ca-cert Path to a CA certificate file, containing one or more CA certificates to use to validate the certificate sent by the consul server to us. This is a handy alternative to setting --ssl-verify=false if you are using your own CA.

  • --auth
    The basic authentication username (and optional password), separated by a colon. Can also be set with the environment variable CONSUL_HTTP_AUTH

  • --token
    The Consul API token. Can also be set with the environment variable CONSUL_HTTP_TOKEN

  • --datacenter
    The data center to query. By default the data center of the agent is used.

ACL Commands

Interface to the /v1/acl endpoint

Agent Commands

Interface to the /v1/agent endpoint

Check Commands

Interface to the /v1/agent/check endpoint

Health Commands

Interface to the /v1/health endpoint

KV Commands

Interface to the /v1/kv endpoint

Service Commands

Interface to the /v1/agent/service endpoint

Session Commands

Interface to the /v1/session endpoint

Status Commands

Interface to the /v1/status endpoint

Clone this wiki locally