[Solved] How can i do a manual rollover for all indices to the newest index policy?

After reading up on the Rollover Index API portion of the documentation, i found my answer!

Apparently i just have to run

POST /filebeat-esnode1/_rollover 
{
  "conditions": {
    "max_age":   "1d",
    "max_size":  "1gb"
  }
}

where filebeat-esnode1 is the rollover alias of the index.
I now see new index being created.

Running this process for all indices that belong to the policy will upgrade all indices version.

Using GET filebeat-esnode1/_ilm/explain & GET _ilm/policy/filebeat-7.0.1 in the console allows me to cross check! :slight_smile:

Edit--
However, doing a manual rollover will cause lifecycle error as shown :

Index lifecycle error
illegal_argument_exception: index [filebeat-esnode1] is not the write index for alias [filebeat-esnode1-2019.05.29-000001]

To solve this,

via this post

4 Likes