# How to limit logging to only 3 months

**URL:** <https://discuss.elastic.co/t/how-to-limit-logging-to-only-3-months/253025>\
**Category:** Elasticsearch\
**Created:** [October 22, 2020, 2:57pm UTC](https://discuss.elastic.co/t/how-to-limit-logging-to-only-3-months/253025 "2020-10-22T14:57:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craig2188](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@Craig2188](https://discuss.elastic.co/u/Craig2188)\
**Post date:** [October 22, 2020, 2:57pm UTC](https://discuss.elastic.co/t/how-to-limit-logging-to-only-3-months/253025/1 "2020-10-22T14:57:52Z")

</div>

Hi,  
I am trying to figure out how to limit the number of logs on Elastic/Kibana/Logstash to only hold 3 months worth of data. It is all installed on windows servers.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 22, 2020, 3:09pm UTC](https://discuss.elastic.co/t/how-to-limit-logging-to-only-3-months/253025/2 "2020-10-22T15:09:56Z")

</div>

I'd look at

> **[ILM: Manage the index lifecycle | Elasticsearch Reference \[7.9\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html)**

---

<div class="post-metadata">

**Author:** ![Craig2188](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@Craig2188](https://discuss.elastic.co/u/Craig2188)\
**Post date:** [October 23, 2020, 9:55am UTC](https://discuss.elastic.co/t/how-to-limit-logging-to-only-3-months/253025/3 "2020-10-23T09:55:52Z")

</div>

So, I create a new index lifecycle policy with Hot Phase set to index size 50GB, Max age 90 days, then enable the Delete phase and set that to 90 days from rollover? Then just apply that to the only policy that has a linked indices?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/5/f5a63514beedf0ca67c86e64f9b72dbb448d6eb5.png)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 3, 2020, 4:17pm UTC](https://discuss.elastic.co/t/how-to-limit-logging-to-only-3-months/253025/4 "2020-11-03T16:17:16Z")

</div>

I believe so. That should work.

---

<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:** [December 1, 2020, 4:17pm UTC](https://discuss.elastic.co/t/how-to-limit-logging-to-only-3-months/253025/5 "2020-12-01T16:17:18Z")

</div>

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