kibana - Add Custom index pattern ID to existing Index Pattern
问题描述
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?
解决方案
仅供参考索引模式在后台的外观:
{
"_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?
推荐阅读
- python - Python 脚本插入数据 MySQL Google Cloud
- mysql - 多个连接上的 SQL 太慢了
- javascript - 使用 JS 成功 POST 到数据库
- python - 函数不起作用:结果 = 缺少 1 个必需的位置参数:
- sql - 在 SQL Server Select Query 中将文本从一列解析为三列
- python - 如何为没有键的字典提取列
- dart - 有没有办法用架子来获取调用者的地址?
- r - 不同大小乘法的矩阵
- linux - 为什么有些 cli 程序不返回参数?
- ruby-on-rails - Rails:使用 html 输入标签获取选中的单选按钮值