How to modify default total_indices count of 20 to desired count and set replication for each index


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 elastic search never starts if I add this property to my elasticsearch.yml file.


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: graylog2 graylog-master-1
 node.master: true false
 node.client: false /graylog2
 bootstrap.memory_lock: true localhost
 http.port: 9200
discovery.zen.multicast.enabled: false ["master1_IP", "master2_IP"]
 discovery.zen.minimum_master_nodes: 1
 elasticsearch_max_number_of_indices: 200

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