Setting elasticsearch monitoring history duration using API


(Dheeraj Gupta) #1

I am using Elasticsearch-6.3.0 with (default) basic license. I have enabled monitoring but would like to keep monitoring indices for less than default 7d. I tried to update the xpack.monitoring.history.duration setting as described in docs and it looks like the setting was updated successfully. Here are my current settings:

$ curl -X GET "esmasters:9200/_cluster/settings?pretty"
{
  "persistent" : {
    "cluster" : {
      "routing" : {
        "allocation" : {
          "enable" : "all"
        }
      }
    },
    "xpack" : {
      "monitoring" : {
        "collection" : {
          "enabled" : "true",
          "indices" : ""
        },
        "history" : {
          "duration" : "4d"
        }
      }
    }
  },
  "transient" : {
    "cluster" : {
      "routing" : {
        "allocation" : {
          "enable" : "all"
        }
      }
    }
  }
}

Despite this setting, the indices are retained for 7 days only. I found an older post which stated that setting has no effect under basic license. However, it was for older version of X-pack.

  1. Can we not change the history.duration setting if we have a (default) basic license with ElasticStack 6.3.0 or newer?
  2. Does this setting not work through Elasticsearch cluster update API and must it be done on each node?

I feel current docs can be modified to explain these two points better


(system) #2

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