which should set the number of shards to 1 and the number of replicas to 0.
However, when running filebeat-7.16.3 as follows
filebeat -e setup --pipelines --index-management --modules microsoft
in order to set up pipelines and index management in Elasticsearch, the above settings have no effect whatsoever (even after removing the filebeat index templates, pipelines and ilm policy by hand).
I know that it can be done, but I am rather interested why setting the number of shards and replicas in the filebeat configuration file does not work, although the documentation advertises it.
risto
The other parts in the configuration file set up access to Elasticsearch and it works without issues -- after deleting the template, it appears again when 'filebeat setup' gets executed. However, what is not working as expected are the directives for configuring the number of shards and replicas (they will both remain set to 1 which is the default).
I think I have found the reason for this issue. I needed to change the number of replicas from 1 to 0, and in addition to my setup.template.settings entry, the filebeat.yml file contained another entry that looked like this:
As you can see, It specifies just the number of shards without the number of replicas. Initially, I didn't notice the second instance and even though the number of replicas was not provided there, it appears that the mere appearance of the second setup.template.settings: directive will override the previous number_of_replicas setting with the default (that is, 1). After getting rid of the duplicate block my original command line worked as expected.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.