Hi @anton3. This is an experimental new feature we've just added in 8.9, and it looks like we didn't correctly document how to enable it. Just to emphasize though, this is an unreleased experimental feature that is subject to change in future versions. If that's what you're looking for (and we would certainly appreciate any feedback on it), the way to enable it is to pass -Des.dlm_feature_flag_enabled=true as a JVM argument when you start your Elasticsearch nodes (all of them). Please don't run this in production since it is just a feature preview.
If you are just looking for the currently-supported way to handle retention in data streams, ILM is the recommended way right now (Set up a data stream | Elasticsearch Guide [8.9] | Elastic).
Thanks for replying, because I already lost hope
One more question. If I apply lifecycle policy with delete phase for my datastream, is already existing data gonna be affected? If so, how fast these changes will affect existing data?
As I can see now, after applying lifetime policy old data was not deleted, though it's older than policy allows.
If I apply lifecycle policy with delete phase for my datastream, is already existing data gonna be affected? If so, how fast these changes will affect existing data?
Are you talking about the experimental lifecycle data_retention? I believe that that will delete older data the first time it runs, but I believe by default it only checks every 10 minutes. So you might have to wait 10 minutes to see your older data deleted. If that's not the case, please paste your data stream configuration here.
I'm referring to the recommended way you pointed.
F.e. autocreated stream logs-generic-default there is also index attached to it.
i have created my-index-template with lifecycle-policy-7days, as you can see it was applied to this stream
Probably i'm doing something wrong, but i don't know what exactly, because i have logs older than 7 days and they weren't deleted. I mean i tried put "min_age": "3d" for delete phase, but nothing changed
Oh OK. I'm glad you went with the currently-supported option. You will probably get better responses if you open a new post for your latest question. There are a lot of ILM experts on this forum (I am not one of them). Most of them are probably not going to read a post with x_content_parse_exception in its title.
One thing to keep in mind with ILM though -- the delete min_age is the minimum amount of time after rollover before the index will be deleted. Since your data stream is fairly new, it has probably not been 7 days since the first data was rolled over into a new index.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.