Master-slave configuration setting

Master-slave configuration setting, how to set slave automatic change to the main ,when the main hang up.

There is no such thing as a slave in Elasticsearch.

As long as you have more than one master-eligible node in the cluster, then you won't have any problems. Elasticsearch handles it automatically.

but I set one server is node.master=true
another server is not.
this is not work?

No it will not if you have it set to false.

thanks you , I try it again.

If you want to be able to handle a node going down without impairing the cluster you need a minimum of 3 master-eligible nodes as Elasticsearch requires a majority of master eligible nodes to be available in order to allow writes. Make sure you follow these guidelines to avoid split-brain scenarios.

1 Like

only have two server
I set one

node.name: node-0
node.master: true
node.data: true

anothoer

node.name: node-1
node.master: true
node.data: true

Then you need to make sure you set discovery.zen.minimum_master_nodes to 2.

thanks you, I set it, and how about logstash out put?

output {

if [beatType] == "metricbeat" {
        
  elasticsearch {
        hosts => ["172.19.0.244:9200","172.19.0.245:9200"]
    index => "metricbeat-%{+YYYY.MM.dd}"
    }
}

if [beatType] == "filebeat" {
   
 
  elasticsearch {
        hosts => ["172.19.0.244:9200","172.19.0.245:9200"]
    index => "filebeat-%{+YYYY.MM.dd}"
    }
  stdout { codec => rubydebug }
}  
   
}

can set like this?

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