# How long do logs stay in Elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-long-do-logs-stay-in-elasticsearch/20449>\
**Category:** Elasticsearch\
**Created:** [October 27, 2014, 2:31pm UTC](https://discuss.elastic.co/t/how-long-do-logs-stay-in-elasticsearch/20449 "2014-10-27T14:31:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron\_Lee](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@Aaron\_Lee](https://discuss.elastic.co/u/Aaron_Lee)\
**Post date:** [October 27, 2014, 2:31pm UTC](https://discuss.elastic.co/t/how-long-do-logs-stay-in-elasticsearch/20449/1 "2014-10-27T14:31:49Z")

</div>

I was wondering how long logs or events stay in Elasticsearch? Is there a  
way we can change the default value?

Thanks,  
Aaron Lee

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5bf81d3e-2a63-4197-8cfd-65af52fbc2b8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5bf81d3e-2a63-4197-8cfd-65af52fbc2b8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [October 27, 2014, 5:09pm UTC](https://discuss.elastic.co/t/how-long-do-logs-stay-in-elasticsearch/20449/2 "2014-10-27T17:09:31Z")

</div>

Hi Aaron,

Unless documents are configured with a TTL[1], elasticsearch does not  
delete documents automatically. You are probably looking for a tool like  
curator[2] that helps deal with time-based indices?

[1]

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

[2] [GitHub - elastic/curator: Curator: Tending your Elasticsearch indices](https://github.com/elasticsearch/curator)

On Mon, Oct 27, 2014 at 3:31 PM, Aaron Lee [arnnlee5@gmail.com](mailto:arnnlee5@gmail.com) wrote:

> I was wondering how long logs or events stay in Elasticsearch? Is there a  
> way we can change the default value?
> 
> Thanks,  
> Aaron Lee
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/5bf81d3e-2a63-4197-8cfd-65af52fbc2b8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5bf81d3e-2a63-4197-8cfd-65af52fbc2b8%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/5bf81d3e-2a63-4197-8cfd-65af52fbc2b8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/5bf81d3e-2a63-4197-8cfd-65af52fbc2b8%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j5rNHmLFqLiAHvZVEb%2BarzsDusZr0z9Bw1-ycfG-PfO6Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j5rNHmLFqLiAHvZVEb%2BarzsDusZr0z9Bw1-ycfG-PfO6Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:53am UTC](https://discuss.elastic.co/t/how-long-do-logs-stay-in-elasticsearch/20449/3 "2017-07-06T00:53:41Z")

</div>


