Auto Delete index log ElasticSearch by period

How can i configure ElasticSearch to delete logs passed 1 month, or if there is no sush conf, how can i call api delete from java client

i want to send post with authentification and with query for delete :
json = {
"query": {
"range": {
"@timestamp": {
"lte": "now-10d"
}
}
}
}

Have a look at ILM: Manage the index lifecycle | Elasticsearch Guide [7.13] | Elastic

1 Like

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