# Xpack.monitoring.history.duration with a value other than "7d" does not work

**URL:** https://discuss.elastic.co/t/xpack-monitoring-history-duration-with-a-value-other-than-7d-does-not-work/238134
**Category:** Elasticsearch
**Tags:** elastic-stack-monitoring
**Created:** [June 22, 2020, 5:48pm UTC](https://discuss.elastic.co/t/xpack-monitoring-history-duration-with-a-value-other-than-7d-does-not-work/238134 "2020-06-22T17:48:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Rysiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rysiu/32/61919_2.png) [@Rysiu](https://discuss.elastic.co/u/Rysiu)
#### Post date: [June 22, 2020, 5:48pm UTC](https://discuss.elastic.co/t/xpack-monitoring-history-duration-with-a-value-other-than-7d-does-not-work/238134/1 "2020-06-22T17:48:50Z")

</div>

Hi,

Referring to the documentation:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/monitoring-settings.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/monitoring-settings.html)

We have value: xpack.monitoring.history.duration (default 7d).

I can execute query:

```auto
PUT _cluster/settings
{"persistent": {"xpack.monitoring.history.duration":"30d"}}

```

... or put this data in elasticsearch config.

If I make queries:

```auto
GET _cluster/settings

```

Elasticsearch return:

```auto
{
  "persistent" : {
    "cluster" : {
      "routing" : {
        "allocation" : {
          "enable" : "all"
        }
      }
    },
    "indices" : {
      "breaker" : {
        "fielddata" : {
          "limit" : "45%"
        }
      }
    },
    "xpack" : {
      "monitoring" : {
        "collection" : {
          "enabled" : "true"
        },
        "history" : {
          "duration" : "30d"
        }
      }
    }
  },
  "transient" : { }
}

```

However, with such a variable (30d) elasticsearch still deletes monitoring indices as for 7d.  
There are no changes - still unchanged 7 days.  
Where are the possible problems?

---

<div class="post-metadata">

### Author: ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)
#### Post date: [June 22, 2020, 7:16pm UTC](https://discuss.elastic.co/t/xpack-monitoring-history-duration-with-a-value-other-than-7d-does-not-work/238134/2 "2020-06-22T19:16:27Z")

</div>

Hello @Rysiu,

If you're on a basic license, the history is limited to 7 days, regardless of the setting.

---

<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 20, 2020, 7:16pm UTC](https://discuss.elastic.co/t/xpack-monitoring-history-duration-with-a-value-other-than-7d-does-not-work/238134/3 "2020-07-20T19:16:29Z")

</div>

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