# Xpack.monitoring.history.duration doesn't work

**URL:** https://discuss.elastic.co/t/xpack-monitoring-history-duration-doesnt-work/88622
**Category:** Elasticsearch
**Created:** [June 7, 2017, 7:44pm UTC](https://discuss.elastic.co/t/xpack-monitoring-history-duration-doesnt-work/88622 "2017-06-07T19:44:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![suanmeiguo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suanmeiguo/32/11758_2.png) [@suanmeiguo](https://discuss.elastic.co/u/suanmeiguo)
#### Post date: [June 7, 2017, 7:44pm UTC](https://discuss.elastic.co/t/xpack-monitoring-history-duration-doesnt-work/88622/1 "2017-06-07T19:44:33Z")

</div>

I have following settings in my `elasticsearch.yml` file. What I need is to keep a 90 days history of monitoring index data so I can look back and compare.

```auto
# xpack settings
xpack.monitoring.history.duration: 90d
xpack.monitoring.exporters.my_local:
  type: local
  use_ingest: false
  index.name.time_format: YYYY.MM

```

However, at the beginning of each month, the previous month monitoring index is still got deleted automatically. The index name is `.monitoring-kibana-2-2017.05` and `.monitoring-es-2-2017.05` for example. Hence I lost my monitoring data for last month.

Is there any config I did wrong? Thank you.

---

<div class="post-metadata">

### Author: ![pickypg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pickypg/32/62409_2.png) [@pickypg](https://discuss.elastic.co/u/pickypg)
#### Post date: [June 7, 2017, 8:10pm UTC](https://discuss.elastic.co/t/xpack-monitoring-history-duration-doesnt-work/88622/2 "2017-06-07T20:10:40Z")

</div>

Hi @suanmeiguo,

What is your licensing type? With the basic license, we will delete any index after 7 days regardless of the setting.

Let us know,  
Chris

---

<div class="post-metadata">

### Author: ![suanmeiguo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suanmeiguo/32/11758_2.png) [@suanmeiguo](https://discuss.elastic.co/u/suanmeiguo)
#### Post date: [June 7, 2017, 10:47pm UTC](https://discuss.elastic.co/t/xpack-monitoring-history-duration-doesnt-work/88622/3 "2017-06-07T22:47:41Z")

</div>

Ah that's it. Thank you that's good to know!

---

<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, 10:47pm UTC](https://discuss.elastic.co/t/xpack-monitoring-history-duration-doesnt-work/88622/4 "2017-07-05T22:47:43Z")

</div>

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