# How to limit the size of the index?

**URL:** <https://discuss.elastic.co/t/how-to-limit-the-size-of-the-index/12638>\
**Category:** Elasticsearch\
**Created:** [July 3, 2013, 10:29am UTC](https://discuss.elastic.co/t/how-to-limit-the-size-of-the-index/12638 "2013-07-03T10:29:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balgrim](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@Balgrim](https://discuss.elastic.co/u/Balgrim)\
**Post date:** [July 3, 2013, 10:29am UTC](https://discuss.elastic.co/t/how-to-limit-the-size-of-the-index/12638/1 "2013-07-03T10:29:27Z")

</div>

Hi all,

I have install recently my logstash/elasticsearch solution.

But I have a size problem too many log after 1 month the index size too  
important. I want to know if exist a solution to delete automaticaly the  
old events or to limit the size oh the index ?

Thanks

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Boaz\_Leskes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boaz_leskes/32/723_2.png) [@Boaz\_Leskes](https://discuss.elastic.co/u/Boaz_Leskes)\
**Post date:** [July 3, 2013, 10:50am UTC](https://discuss.elastic.co/t/how-to-limit-the-size-of-the-index/12638/2 "2013-07-03T10:50:59Z")

</div>

Hi Balgrim,

Did you change the default configuration of logstash, creating one index  
per day? ([Elasticsearch output plugin | Logstash Reference [8.11] | Elastic](http://logstash.net/docs/1.1.13/outputs/elasticsearch) )

If you kept the default, you can simply run a cronjob calling the index  
delete api to delete old indexes  
(see: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-delete-index/)  
)

Cheers,  
Boaz

On Wednesday, July 3, 2013 12:29:27 PM UTC+2, Balgrim wrote:

> Hi all,
> 
> I have install recently my logstash/elasticsearch solution.
> 
> But I have a size problem too many log after 1 month the index size too  
> important. I want to know if exist a solution to delete automaticaly the  
> old events or to limit the size oh the index ?
> 
> Thanks

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Balgrim](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@Balgrim](https://discuss.elastic.co/u/Balgrim)\
**Post date:** [July 5, 2013, 6:05am UTC](https://discuss.elastic.co/t/how-to-limit-the-size-of-the-index/12638/3 "2013-07-05T06:05:32Z")

</div>

Hi Boaz,

thanks a lot for advices it works !

Cheers,  
Balgrim

Le mercredi 3 juillet 2013 12:50:59 UTC+2, Boaz Leskes a écrit :

> Hi Balgrim,
> 
> Did you change the default configuration of logstash, creating one index  
> per day? ([Elasticsearch output plugin | Logstash Reference [8.11] | Elastic](http://logstash.net/docs/1.1.13/outputs/elasticsearch) )
> 
> If you kept the default, you can simply run a cronjob calling the index  
> delete api to delete old indexes (see:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-delete-index/))
> 
> Cheers,  
> Boaz
> 
> On Wednesday, July 3, 2013 12:29:27 PM UTC+2, Balgrim wrote:
> 
> > Hi all,
> > 
> > I have install recently my logstash/elasticsearch solution.
> > 
> > But I have a size problem too many log after 1 month the index size too  
> > important. I want to know if exist a solution to delete automaticaly the  
> > old events or to limit the size oh the index ?
> > 
> > Thanks

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:28am UTC](https://discuss.elastic.co/t/how-to-limit-the-size-of-the-index/12638/4 "2017-07-06T02:28:06Z")

</div>


