# Automatic deletion of marvel indices not working

**URL:** https://discuss.elastic.co/t/automatic-deletion-of-marvel-indices-not-working/48492
**Category:** Elasticsearch
**Tags:** elastic-stack-monitoring
**Created:** [April 27, 2016, 12:44am UTC](https://discuss.elastic.co/t/automatic-deletion-of-marvel-indices-not-working/48492 "2016-04-27T00:44:42Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![bohyun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bohyun/32/10087_2.png) [@bohyun](https://discuss.elastic.co/u/bohyun)
#### Post date: [June 16, 2016, 5:50pm UTC](https://discuss.elastic.co/t/automatic-deletion-of-marvel-indices-not-working/48492/2 "2016-06-16T17:50:03Z")

</div>

Hi Con -

Our basic license defaults the marvel indices to 7 days of data and no option to extend that retention policy. Is this what you're observing?

and Yes, you need to install marvel-agent on both clusters.

1. Install marvel-agent on secondary cluster
2. Disable local collection marvel.agent.interval: -1
3. Set marvel.history.duration

If you know how many days of marvel indices that you want to keep, it is as simple as configuring the following marvel.agent options in a node’s elasticsearch.yml file to control how Marvel data is collected from the node:

marvel.history.duration  
Sets the retention duration beyond which the indices created by Marvel will be automatically deleted. Defaults to 7 days. Set to -1 to disable automatic deletion of Marvel indices.

For more marvel configuration options, please visit  
[https://www.elastic.co/guide/en/marvel/current/configuration.html](https://www.elastic.co/guide/en/marvel/current/configuration.html)

Hope this helps,  
Bohyun

---

_[View the full topic](https://discuss.elastic.co/t/automatic-deletion-of-marvel-indices-not-working/48492)._
