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
}
}
}
}
}
}