0

I have created an Index Pattern in Kibana, which successfully matches the indexes that I need. I would like to go back and give that existing Index Pattern a custom ID (In the Advanced Options in Step 2 of the wizard in Kibana when creating). Is that possible, or do I need to delete/recreate the Index Pattern?

4

1 回答 1

0

仅供参考索引模式在后台的外观:

{
    "_index" : ".kibana_1",
    "_type" : "_doc",
    "_id" : "index-pattern:metricbeat-*",
    "_score" : 1.0,
    "_source" : {
      "index-pattern" : {
        ...,
        "timeFieldName" : "@timestamp",
        "title" : "metricbeat-*"
      },
      "type" : "index-pattern",
      "references" : [ ],
      "migrationVersion" : {
        "index-pattern" : "6.5.0"
      },
      "updated_at" : "2019-08-11T09:00:09.020Z"
    }
}

如果您为索引模式设置自定义 ID,它将导致"_id" : "index-pattern:<your-name>". 因此,无论您做什么,您都需要删除旧的索引模式并创建一个新的(即使您通过 API 更新文档的某些部分),因为文档 ID 定义了文档。

但一般来说,索引模式不包含太多信息,所以应该很容易重新创建,对吧?

另外,为什么您需要索引模式的特定 ID?

于 2019-08-19T19:50:41.593 回答