Hi!
I was reading this two links in order to create a policy to delete the indexes of more than 7 days.
https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index-lifecycle-management.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/applying-policy-to-template.html#applying-policy-to-template
This is my template
GET /_template/company_template
{
"company_template" : {
"order" : 0,
"index_patterns" : [
"gke_prod_*",
"gke_stage_*"
],
"settings" : {
"index" : {
"lifecycle" : {
"name" : "company_policy"
},
"number_of_shards" : "1",
"number_of_replicas" : "1"
}
},
"mappings" : { },
"aliases" : { }
}
}
This is my policy
GET _ilm/policy/company_policy
{
"company_policy" : {
"version" : 1,
"modified_date" : "2019-08-27T11:30:21.963Z",
"policy" : {
"phases" : {
"delete" : {
"min_age" : "7d",
"actions" : {
"delete" : { }
}
}
}
}
}
}
However when I go to Index Lifecycle Policies in web console I don't see any "Linked indices"
and the index patern is correct.
What I do wrong or how I can debug?
I have a lot of old indexes, this policy should be apply to all indices too or only from today (for new indexes)?
Thank you