Trying to create an index template to create a data stream

I'm attempting to follow this tutorial
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/getting-started-index-lifecycle-management.html
And I am at the point where it says to Create an index template

PUT _index_template/timeseries_template
{
  "index_patterns": ["timeseries"],                   
  "data_stream": { },
  "template": {
    "settings": {
      "number_of_shards": 1,
      "number_of_replicas": 1,
      "index.lifecycle.name": "timeseries_policy"     
    }
  }
}

But I get this error

{
  "error" : {
    "root_cause" : [
      {
        "type" : "x_content_parse_exception",
        "reason" : "[3:3] [index_template] unknown field [data_stream]"
      }
    ],
    "type" : "x_content_parse_exception",
    "reason" : "[3:3] [index_template] unknown field [data_stream]"
  },
  "status" : 400
}

It also says you can use the Kibana Create template wizard but haven't found that yet in Kibana.

FYI 7.X is the master version of the docs, and can contain things that haven't been released yet. You should use https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index-lifecycle-management.html, or replace current for whatever version you are using.

What version are you running at the moment?

I am using 7.8, I will try again using this documentation. thank you

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