Unable to update index rollover

Hello there,

I am trying to modify the rollover conditions of a handful of indexes in my ES cluster.

Elasticsearch version: 7.11.2
Winlogbeat version: 7.11.2

In order to do so I am using the following query:

curl -u elastic:**** -kv -X POST https://192.**.100.107:9200/myindex-*/_rollover?pretty -H 'Content-Type: application/json' -d'
{
  "conditions": {
    "max_age": "15d",
    "max_docs": 1000,
    "max_single_primary_size": "15gb"
  }
}
'

It seems Elasticsearch API returns a "Bad Request" error, because it is not able to parse the param "max_single_primary_size".

The JSON response is the following:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "x_content_parse_exception",
        "reason" : "[6:5] [conditions] unknown field [max_single_primary_size]"
      }
    ],
    "type" : "x_content_parse_exception",
    "reason" : "[6:32] [rollover] failed to parse field [conditions]",
    "caused_by" : {
      "type" : "x_content_parse_exception",
      "reason" : "[6:5] [conditions] unknown field [max_single_primary_size]"
    }
  },
  "status" : 400
}

I followed the following link in the docs: Rollover API | Elasticsearch Guide [7.x] | Elastic

Am I missing any specific settings?

Thanks in advance!

Kind regards,

The 7.x documentation is for themaster and refers to a version that has not yet been released. Always make sure you look at the docs for the particular version you are using. In this case it looks like the parameter you use was introduced in 7.12.

2 Likes

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