The default number of shard is 5 in the yml setting. I also didn't specify any template for all logstash config.
Most of the index are with correct number of shards,
However, some index appears to be only 1 primary shard.
I search all over the internet and cannot find relevant problem.
What could be the possible reason?
Did you already check if there is an index template for this index where the setting is overwritten? Or could it be that the indexes where created before the setting was changed(The number_of_shards setting only applies at creation date).
Index templates can be checked by the ElasticSearch API:
Did you upgrade elasticsearch version?
Old versions of elasticsearch were using 5 shards by default. New versions are using 1 shard. Looks like new indices have 1 shard.
I would recommend aiming for an average shard size of around at least 10GB. If you have a long retention period you could go with a single primary shard and weekly or monthly indices rather than daily. This blog post contains additional details.
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.