Index template not match for logs

I tride create index template with ilm policy.
My logsatsh output has

index => "logstash-logs-lb-%{+YYYY.MM.dd}"

Index template with config

PUT _template/logstash-logs-lb
{
  "order": 0,
  "index_patterns": [
    "logstash-logs-lb-*"
  ],
  "settings": {
    "index": {
      "lifecycle": {
        "name": "logstash-logs-lb",
        "rollover_alias": "logstash-logs-lb-alias"
      },
      "number_of_shards": "2",
      "priority": "200",
      "number_of_replicas": "1"
    }
  }
}

When I start up my logstash I got whery strange index which contain my ilm policy but replicas and shards count is wrong.

{
  "settings": {
    "index": {
      "lifecycle": {
        "name": "logstash-logs-lb",
        "rollover_alias": "logstash-logs-lb-alias"
      },
      "refresh_interval": "5s",
      "number_of_shards": "1",
      "provided_name": "logstash-logs-lb-2020.11.29",
      "creation_date": "1606682711526",
      "priority": "100",
      "number_of_replicas": "1",
.....
      }
    }
  },

Why?

There will be a message in elasticsearch log when the index was created listing all templates that were applied at creation. Check that the template mentioned was the only template applied.

Thank you! It's true. Elastic took two policys.

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