Hi @dadoonet , I have index created through logstash. I want to apply lifecycle policy to it to retain logs for 3 days. For testing purpose i have created this policy.
"ilm_cedar": {
"version": 2,
"modified_date": "2023-05-30T10:20:34.684Z",
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"set_priority": {
"priority": 100
},
"rollover": {
"max_age": "55s"
}
}
},
"delete": {
"min_age": "1m",
"actions": {
"delete": {
"delete_searchable_snapshot": true
}
}
}
}
},
"in_use_by": {
"indices": [],
"data_streams": [],
"composable_templates": [
"cedar_template",
"cedar_log_temp"
]
}
},
I'm using index template to apply the policy to the index.
{
"index_templates": [
{
"name": "cedar_log_temp",
"index_template": {
"index_patterns": [
"cedar-*"
],
"template": {
"settings": {
"index": {
"lifecycle": {
"name": "ilm_cedar",
"rollover_alias": "cedar_log"
},
"number_of_shards": "1",
"number_of_replicas": "1"
}
}
},
"composed_of": []
}
}
]
}
I'm getting the error
policy [ilm_cedar] for index [cedar-00001] failed on step [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}]. Moving to ERROR step
java.lang.IllegalArgumentException: rollover target [cedar_log] does not point to a write index.
I tried the update settings API from your response but getting this error. FYI, im using BASIC license.
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.aliases.cedar_log.is_write_index] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.aliases.cedar_log.is_write_index] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
"status": 400
}