Creating index templates from the console using Kibana 6.0

I recently upgraded my ElasticStack instance from 5.5 to 6.0, and it seems that some of the latest changes to this version are harming my pipeline. I had a script that, depending on the indexes inside ElasticSearch, automatically created index templates for some groups of similar indexes. The problem is that with the new display changes of version 6.0 I cannot add any new index patterns from the console. This was a request that I used and worked fine in version 5.5:

curl -XPOST "http://localhost:9200/.kibana/index-pattern" -H 'Content-  Type: application/json' -d'
{
  "title" : "index_name",
  "timeFieldName" : "execution_time"
}'

This is the answer I get now, in version 6.0, from ElasticSearch:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Rejecting mapping update to [.kibana] as the final mapping would have more than 1 type: [index-pattern, doc]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "Rejecting mapping update to [.kibana] as the final mapping would have more than 1 type: [index-pattern, doc]"
  },
  "status": 400
}

How can I add index templates from the console avoiding this multiple display issue?

+4
source
2

URL 6.0.0, URL:

http://localhost:9200/.kibana/doc/doc:index-pattern:my-index-pattern-name 

CURL :

curl -XPOST "http://localhost:9200/.kibana/doc/index-pattern:my-index-pattern-name" -H 'Content-Type: application/json' -d'
{
  "type" : "index-pattern",
  "index-pattern" : {
    "title": "my-index-pattern-name*",
    "timeFieldName": "execution_time"
  }
}'
+3

, Elasticsearch 6.0.0 , .

, 5.x , - Elasticsearch 6.x.

Elasticsearch 7.0.0.

, doc_types ES 6.0.0.  https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html

0

Source: https://habr.com/ru/post/1689612/


All Articles