Skip to content

Instantly share code, notes, and snippets.

@cgswong
Created March 13, 2015 02:27
Show Gist options
  • Save cgswong/d721fec15ecb4972020f to your computer and use it in GitHub Desktop.
Save cgswong/d721fec15ecb4972020f to your computer and use it in GitHub Desktop.
consul/registrator querying

Query Consul directly to see if Registrator registered the services in Consul: curl http://<Consul server IP address>:8500/v1/catalog/services | python -m json.tool

Provide JSON-formatted output that lists all the instances of a service across a consul/registrator cluster, the IP addresses and nodes associated with the service, and any metadata (which probably won’t exist).

curl http://<Consul server IP address>:8500/v1/catalog/service/nginx-80 | python -m json.tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment