Search code examples
elasticsearchelk

ELK Index Lifecycle Issue


I am using ELK for Kong API Gateway logs. I am getting the below index error after applying ILM policy manually by adding the following lines in the index settings:

{
  "index.blocks.read_only_allow_delete": "false",
  "index.query.default_field": [
    "*"
  ],
  "index.refresh_interval": "1s",
  "index.write.wait_for_active_shards": "1",
  "index.lifecycle.name": "kong-index-policy",
  "index.lifecycle.rollover_alias": "kong",
  "index.lifecycle.indexing_complete": "true",
  "index.routing.allocation.include._tier_preference": "data_content",
  "index.mapping.total_fields.limit": "20000",
  "index.priority": "100",
  "index.number_of_replicas": "1"
}

Error:

index lifecycle error illegal_state_exception: index [kong-2022-11-17-000001] has [index.lifecycle.indexing_complete] set to [true], but is still the write index for alias [kong]

I tried to use Retry policy execution API POST kong-2022-11-17-000001/_ilm/retry but the issue is still exist.

How to solve this issue please?


Solution

  • It is solved when setting "index.lifecycle.indexing_complete": "false" in the index settings