Index lifecycle error

Can you help me using kibana ilm error ?

I don't get the meaning of this error:

illegal_argument_exception: index.lifecycle.rollover_alias [metricbeat-6.6.0-alias] does not point to index [metricbeat-6.6.0-2019.03.06]

settings:

{
  "index.blocks.read_only_allow_delete": "false",
  "index.priority": "1",
  "index.query.default_field": [
    "*"
  ],
  "index.write.wait_for_active_shards": "1",
  "index.lifecycle.name": "metricbeat-6.6.0-",
  "index.lifecycle.rollover_alias": "metricbeat-6.6.0-alias",
  "index.mapping.total_fields.limit": "10000",
  "index.refresh_interval": "5s",
  "index.number_of_replicas": "1"
}
 {
  "policy": "metricbeat-6.6.0-",
  "phase_definition": {
    "min_age": "0ms",
    "actions": {
      "rollover": {
        "max_size": "1gb",
        "max_age": "1d"
      }
    }
  },
  "version": 8,
  "modified_date_in_millis": 1551878230967
}

explain:

GET metricbeat-6.6.0-*/_ilm/explain  -->
"indices" : {
    "metricbeat-6.6.0-2019.03.07" : {
      "index" : "metricbeat-6.6.0-2019.03.07",
      "managed" : true,
      "policy" : "metricbeat-6.6.0-",
      "lifecycle_date_millis" : 1551913203940,
      "phase" : "hot",
      "phase_time_millis" : 1551947189334,
      "action" : "rollover",
      "action_time_millis" : 1551913204273,
      "step" : "ERROR",
      "step_time_millis" : 1551947663347,
      "failed_step" : "check-rollover-ready",
      "step_info" : {
        "type" : "illegal_argument_exception",
        "reason" : "index.lifecycle.rollover_alias [metricbeat-6.6.0-alias] does not point to index [metricbeat-6.6.0-2019.03.07]",
        "stack_trace" : """
java.lang.IllegalArgumentException: index.lifecycle.rollover_alias [metricbeat-6.6.0-alias] does not point to index [metricbeat-6.6.0-2019.03.07]
	at org.elasticsearch.xpack.core.indexlifecycle.WaitForRolloverReadyStep.evaluateCondition(WaitForRolloverReadyStep.java:92)
	at org.elasticsearch.xpack.indexlifecycle.IndexLifecycleRunner.runPeriodicStep(IndexLifecycleRunner.java:128)
	at org.elasticsearch.xpack.indexlifecycle.IndexLifecycleService.triggerPolicies(IndexLifecycleService.java:244)
	at org.elasticsearch.xpack.indexlifecycle.IndexLifecycleService.triggered(IndexLifecycleService.java:199)
	at org.elasticsearch.xpack.core.scheduler.SchedulerEngine.notifyListeners(SchedulerEngine.java:164)
	at org.elasticsearch.xpack.core.scheduler.SchedulerEngine$ActiveSchedule.run(SchedulerEngine.java:192)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)

"""
      },

Hi,

I got the same problem and won't find anything helpful in the documentation. So maybe someone here can help us?

Cheers,
Thomas

Hsam,

When you created the index, did you create it and the alias at the same time? Like so:

PUT metricbeat-6.6.0-00001
{
  "aliases": {
    "metricbeat-6.6.0-alias":{
      "is_write_index": true
    }
  }
}

I have the same error. @dakrone the indices are being created by Metricbeat. The template does not contain an alias:

{
"metricbeat-6.6.0": {
    "order": 0,
    "index_patterns": [
        "metricbeat-6.6.0*"
    ],
    "settings": {
        "index": {
            "lifecycle": {
                "name": "Metricbeat"
            }
        }
    },
    "mappings": {},
    "aliases": {}
}

}

Hello, thanks for responding.
No alias is created, those are generated via metricbeat and goes immedialty to elasticsearch (no logstash). When adding it manually, i can indeed see it with no error in the ILM. But i would like to have it done automatically cause i have 1 index per day.

The alias only has to be created once manually. After that the rollover API takes care of updating it.

Can you share more about your setup? It sounds like Metricbeat needs to know it should create that alias the first time the very first index is created so that you don't have to manually add it later. If it ends up not doing that, I think that's a bug in Metricbeat so an issue should be opened.

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