Elasticsearch offers its functionality via API endpoints over HTTP. Therefore any HTTP client can be used to communicate with it.
The most common way to communicate with Elasticsearch is using the command line tool curl. The examples in the official Elasticsearch documentation also provide curl commands to copy.
✅ Check that Elasticsearch is accessible at localhost:9200
curl localhost:9200
it should output name, version and some details, similar to the following output:
{
"name" : "8226182e008a",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "j-gk46dIT5yoAe_8l4sMrA",
"version" : {
"number" : "7.8.1",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "b5ca9c58fb664ca8bf9e4057fc229b3396bf3a89",
"build_date" : "2020-07-21T16:40:44.668009Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
All communication is done via HTTP therefore any HTTP / REST client can be used as well. The following tools provide a graphical interface, to organize / store previous queries etc.
- Postman App - fully fledged API platform client
- Insomnia - a REST client
Another useful tool to check the state of Elasticsearch is Cerebro (the successor to head and kopf). It provides a web interface to see the cluster state, Elasticsearch instances, indexes and more. It also provides some basic management capabilities, for example to set aliases or create / restore snapshots. One of the views is a basic REST interface.
The repository Asquera/elasticsearch-docker also contains a Cerebro container for use. In case you have checked out the repository and are using the setup with Docker and Docker-Compose Cerebro can be started with:
✅ Start Cerebro in a separate shell alongside Elasticsearch
docker-compose up --build --detach cerebro
Once started Cerebro open your browser to access it at URL localhost:9000. The landing page asks for the URL of the Elasticsearch instance. When Cerebro is started as a Docker container provide the name of the container as given in the docker-compose.yml
file, http://elasticsearch01:9200 instead of localhost:9200
.