How to delete logs from elasticsearch automatically

HI Experts,

We are using Elasticsearch 7.9 .
We need to purge automatically the logs that we persist in Elasticsearch index based on a frequency/date

I need a proper guide for that.

thanks,
Sriguruvel.

You will need to create a Index Lifecycle Policy, check out this part of the documentation about Index Lifecycle Management.

hi @leandrojmp ,

thanks for your reply.

thanks,
sriguruvel.