Index Management rollover not working

Hi,

I have a Index Management Policy like this:

PUT _ilm/policy/sample_qa_policy
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_age": "1h",
            "max_size": "1mb"
          }
        }
      },
      "warm": {
        "actions": {}
      },
      "delete": {
        "min_age": "3h",
        "actions": {
          "delete": {}
        }
      }
    }
  }
}

My requirement is to create a index with name sample-00001 and every hour it has to rollover to the newer index sample-00002. In the third hour it has to rollover to sample-00003 and so on. At any given time, I need to keep two Indices : sample-0000n and sample-00000n+1

However, I could only see that the index management policy created only the first rollover sample-00002 and then it stopped.

Template :

PUT _template/template_1
{
    "index_patterns" : ["sample*"],
    "settings" : {
        "number_of_shards" : 1
    },
    "aliases" : {
        "{index}-alias" : {} 
    }
}

Looks like the above mentioned index management policy go applied only to sample-000001 index. Could someone help me achieve this continuous rollover?

Thanks,
Somebody

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