Outside of localhost server making it available Elasticsearch


Instance to the outside via HTTP to make available an Elasticsearch, do you do the following:

1. To the outside make the server available, Amazon AWS z.B. through the configure a security group

2. Change the elasticsearch.yml ( /etc/elasticsearch/elasticsearch.yml):

# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 172.44.11.222

3. The Elasticsearch service restart:

sudo service elasticsearch restart

4. Then you can query the status from the outside to look, If everything worked:

curl -XGET '172.44.11.222:9200/_cluster/health?pretty'

Response:

{
  "cluster_name" : "elasticsearch",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}