Hello,
Here I am trying to set elastic-search (Version 2.4) cluster with Graylog2 ( Version 2.2). I brought up two master nodes (for fail-over purpose), two data nodes and two client nodes ( graylog server itself ). Have attached single line diagram below,
My problem here is, I want to keep a maximum of 200 indices with replicas. From some resource I found the below CURL command to create replicas
curl -XPUT 'http://localhost:9200/graylog2_*/_settings' -d '
{
"index" : {
"number_of_replicas" : 1
}
}'
but i have to run this every time, when a new index gets created. I also tried adding index.number_of_replicas: 1
but Elasticsearch never starts if I add this property to my elasticsearch.yml
file.
Secondly,
I have also added elasticsearch_max_number_of_indices = 200
in my elasticsearch.yml file. This time my elasticsearch starts, but whenever i check my indices count its always 20. Have attached my ES configuration file below, please correct me if I am wrong. Will be grateful for any help on this, thanks in advance.
Elasticsearch Master Config:
cluster.name: graylog2
node.name: graylog-master-1
node.master: true
node.data: false
node.client: false
path.data: /graylog2
bootstrap.memory_lock: true
network.host: localhost
network.bind.host: 0.0.0.0
http.port: 9200
discovery.zen.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["master1_IP", "master2_IP"]
discovery.zen.minimum_master_nodes: 1
elasticsearch_max_number_of_indices: 200