# \[Config\] marvel.history.duration (format)

**URL:** https://discuss.elastic.co/t/config-marvel-history-duration-format/50228
**Category:** Elasticsearch
**Tags:** elastic-stack-monitoring
**Created:** [May 17, 2016, 2:34pm UTC](https://discuss.elastic.co/t/config-marvel-history-duration-format/50228 "2016-05-17T14:34:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![TroyAndAbed](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@TroyAndAbed](https://discuss.elastic.co/u/TroyAndAbed)
#### Post date: [May 17, 2016, 2:34pm UTC](https://discuss.elastic.co/t/config-marvel-history-duration-format/50228/1 "2016-05-17T14:34:38Z")

</div>

Hi everyone,

I'm trying to setup the config marvel.history.duration to delete automatically the indices created by Marvel.

The documentation says: 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.

So, I tried to put: `marvel.history.duration: 2` on my elasticsearch.yml but today i got the following error in my logs:

> [2016-05-17 00:59:58,402][ERROR][marvel.cleaner] [noeud-test] failed to clean indices  
> ElasticsearchParseException[Failed to parse setting [marvel.history.duration] with value [2] as a time value: unit is missing or unrecognized]

So, what is the format for this settings. Do i need to put `marvel.history.duration: "2d"` ?

Thank you.

---

<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: [May 17, 2016, 2:42pm UTC](https://discuss.elastic.co/t/config-marvel-history-duration-format/50228/2 "2016-05-17T14:42:13Z")

</div>

> [@TroyAndAbed](#):
>
> So, what is the format for this settings. Do i need to put marvel.history.duration: "2d" ?

Yes, that is correct.

---

<div class="post-metadata">

### Author: ![TroyAndAbed](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@TroyAndAbed](https://discuss.elastic.co/u/TroyAndAbed)
#### Post date: [May 17, 2016, 2:43pm UTC](https://discuss.elastic.co/t/config-marvel-history-duration-format/50228/3 "2016-05-17T14:43:41Z")

</div>

Thanks, I will try that.

---

<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, 1:43pm UTC](https://discuss.elastic.co/t/config-marvel-history-duration-format/50228/4 "2017-07-06T13:43:30Z")

</div>


