# Disk space based retention of index documents

**URL:** <https://discuss.elastic.co/t/disk-space-based-retention-of-index-documents/45956>\
**Category:** Elasticsearch\
**Created:** [March 31, 2016, 2:54pm UTC](https://discuss.elastic.co/t/disk-space-based-retention-of-index-documents/45956 "2016-03-31T14:54:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MRosker](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@MRosker](https://discuss.elastic.co/u/MRosker)\
**Post date:** [March 31, 2016, 2:54pm UTC](https://discuss.elastic.co/t/disk-space-based-retention-of-index-documents/45956/1 "2016-03-31T14:54:43Z")

</div>

Hi,  
I am wondering, if there is a way to configure elasticsearch in a way, that elastic search indices start deleting documents when a certain disk threshold is exceeded?

What I have in mind is a elasticsearch setup, which behaves much like a cyclic logging.

Background is, that I'm thinking about offering a ELK as a Service offering and somehow need an automatic way to manage my elasticsearch in a fixed resource environment (fixed disk size in particular).

Best regards,  
Matthias

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 1, 2016, 5:13am UTC](https://discuss.elastic.co/t/disk-space-based-retention-of-index-documents/45956/2 "2016-04-01T05:13:24Z")

</div>

> [@MRosker](#):
>
> I am wondering, if there is a way to configure elasticsearch in a way, that Elasticsearch indices start deleting documents when a certain disk threshold is exceeded?

No.

But there is [Elasticsearch Curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html) that can do it if you are using time based indices, which you should be!

---

<div class="post-metadata">

**Author:** ![MRosker](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@MRosker](https://discuss.elastic.co/u/MRosker)\
**Post date:** [April 1, 2016, 9:22am UTC](https://discuss.elastic.co/t/disk-space-based-retention-of-index-documents/45956/3 "2016-04-01T09:22:35Z")

</div>

Thanks Mark, this might do the trick - will take a closer look!

---

<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 5, 2017, 11:03pm UTC](https://discuss.elastic.co/t/disk-space-based-retention-of-index-documents/45956/4 "2017-07-05T23:03:22Z")

</div>


