Define cluster and data replication in Elasticsearch 6.4


Can some one suggest me how to define the cluster details (ip's) and the data replication values in the new elasticsearch.yml, the below is my present yml

---------------------------------- Cluster -----------------------------------

Use a descriptive name for your cluster: mycluster

------------------------------------ Node ------------------------------------

Use a descriptive name for the node: node-1

Add custom attributes to the node:

#node.attr.rack: r1

--------------------------------- Discovery ----------------------------------

Pass an initial list of hosts to perform discovery when new node is started:

The default list of hosts is ["", "[::1]"] ["ip1", "ip2"]

Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):



  1. Please format your code as code, so it's properly readable :slight_smile:
  2. Replication is set per index (or globally or via a template) via the API. See for the creation and for update settings.
  3. To form a cluster you need to configure the IP addresses / DNS names of the other nodes in

Thank-you @xeraa, can you please let me know how to add security (xpack) configuration on elasticsearch.yml, i belive there has to be some added notations of xpack in the elasticsearch.yml, or is there any other way

Assuming you have the default package, which includes X-Pack, you need to start a trial and then enable security:

Though this is another topic. If you have more questions about X-Pack or security, please start another discussion.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.