Number_of_replicas changes for new indexes of filebeat and metricbeat

Hi,

I set number of replicas to 0 to make all my indexes green ( I only have one machine in my cluster).
curl -XPUT 'elasticsearch:9200/_settings' -d '{ "index" : { "number_of_replicas" : 0 } }'

The next day I have new indexes of filebeat and metricbeat but they have number_of_replicas set to 1 and their status becomes yellow.

How can I make all new indexes have 0 replicas?

Br Mathias

You need to edit the template for the indices so that it won't create replicas.
However you can just ignore yellow status, given you have a single node.

Hi warkolm,

looking at metricbeat template:
curl -XGET 'http://elasticsearch:9200/_template/metricbeat*?pretty'

I can not see that number of replicas is set to 1.

Can you give me a hint where to look?
(I am using version 5.3.1 of metricbeat and 5.3.0 of logstash and elasticsearch)

Br Mathias

You have to adjust the value in the metricbeat template and overwrite the existing template with it. Have a look at the metricbeat.template.json file in your metricbeat directory. There you have to add the setting and then overwrite the existing mapping. Next day it should apply.

This topic was automatically closed after 21 days. New replies are no longer allowed.