Indices are not deleteing using Lifecycle policy

In elastic 7.12, I have tried through kibana gui but indices are not able to linked so I used these commands in cli but Indices are linked in kibana but not deleting so please help me on this?

#curl -u elastic: -XPUT -sk ":9200/_ilm/policy/central-container-accesslog_policy" -H 'Content-Type: application/json' -d'{ "policy":{ "phases":{ "delete":{ "min_age":"3d",
"actions":{ "delete":{ } } } } }}' | jq .

#curl -u elastic: -XPUT -sk ":9200/_template/central-container-accesslog_template" -H 'Content-Type: application/json' -d'{ "index_patterns":[ "central-caaslb01-logs-*" ], "settings":{ "number_of_shards":2, "number_of_replicas":1, "index.lifecycle.name":"central-container-accesslog_policy" }}' | jq .

#curl -u elastic: -XPUT -sk ":9200/central-container-accesslog-index" -H 'Content-Type: application/json' -d'{ "settings":{ "number_of_shards":2, "number_of_replicas":1, "index.lifecycle.name":"central-container-accesslog_policy" }}' | jq .

#curl -u elastic: -XGET -sk ":9200/_ilm/policy/central-container-accesslog_policy"

In Kibana:-
PUT _ilm/policy/central-container-accesslog_policy
{
"policy": {
"phases": {
"hot": {
"actions": {
"set_priority": {
"priority": 100
}
},
"min_age": "0ms"
},
"delete": {
"min_age": "3d",
"actions": {
"delete": {
"delete_searchable_snapshot": true
}
}
}
}
}
}

Hi @santosh_rout

in order to check if the ILM policy is working run this API

GET <target>/_ilm/explain

Dear @ibra_013

Yes, its working. i can get so many indices using target as central-caaslb01-logs-* but its showing "managed":false so how do i make as true ?

Dear @ibra_013

[resource_already_exists_exception when running tests] how to fix this issue?

PUT test-000001
{
"aliases": {
"test-alias":{
"is_write_index": true
}
}
}

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