I’m trying to set up a policy which deletes indexes after 3 days. I’ve looked at the documentation here but I’m still getting an error when trying to apply the policy.
Below is my IM policy I set up.
{
"policy": {
"policy_id": "common-lateattach-delete",
"description": "open warm delete workflow",
"last_updated_time": 1605293466946,
"schema_version": 1,
"error_notification": null,
"default_state": "open",
"states": [
{
"name": "open",
"actions": [
{
"rollover": {
"min_index_age": "1d"
}
}
],
"transitions": [
{
"state_name": "warm"
}
]
},
{
"name": "warm",
"actions": [
{
"replica_count": {
"number_of_replicas": 5
}
}
],
"transitions": [
{
"state_name": "delete",
"conditions": {
"min_index_age": "3d"
}
}
]
},
{
"name": "delete",
"actions": [
{
"notification": {
"destination": {
"chime": {
"url": "https://hooks.slack.com/services/##########"
}
},
"message_template": {
"source": "The index {{ctx.index}} is being deleted",
"lang": "mustache"
}
}
},
{
"delete": {}
}
],
"transitions": []
}
]
}
}
Below is the template I have applied to my indexes.
{
"lateattach_common" : {
"order" : 0,
"index_patterns" : [
"lateattach-common-*"
],
"settings" : {
"index" : {
"opendistro" : {
"index_state_management" : {
"policy_id" : "common-lateattach-delete"
}
}
}
},
"mappings" : {
"properties" : {
"@timestamp" : {
"type" : "date"
}
}
},
"aliases" : {
"live" : { }
}
}
}
When the IM policy tries to implement a change, I see the following error.
"info" : {
"message" : "Missing rollover_alias index setting [index=lateattach-common-2020.11.16]"
}
What am I missing in my policy that is preventing it from doing the rollover and then deleting the index?