简体   繁体   English

Kibana不使用现有的.kibana索引

[英]Kibana not using existing .kibana index

I have 2 AWS EC2 instances. 我有2个AWS EC2实例。 One for Elasticsearch (ES) and one for Kibana. 一种用于Elasticsearch(ES),另一种用于Kibana。 I'm trying to backup all the data from ES to AWS S3 and then restore it when creating a new instance. 我正在尝试将所有数据从ES备份到AWS S3,然后在创建新实例时将其还原。

The way I'm doing it is this: 我这样做的方式是这样的:

  1. Terminate Kibana instance 终止Kibana实例
  2. Backup ES data with curator 使用管理器备份ES数据
  3. Terminate ES instance 终止ES实例
  4. Startup new ES instance and restore data with curator 启动新的ES实例并使用管理器还原数据
  5. Startup new Kibana instance 启动新的Kibana实例

The problem is that even though the restoration works (I can see the indices restored in ES including a .kibana_1 index that has an alias to .kibana), when Kibana starts up it doesn't use the existing .kibana_1 index but creates a new one (eg: .kibana_2) 问题是,即使恢复工作正常(我可以看到在ES中恢复的索引,包括具有.kibana别名的.kibana_1索引),当Kibana启动时,它不会使用现有的.kibana_1索引,而是创建了一个新的一个(例如:.kibana_2)

Is there something I'm doing wrong? 我做错了什么吗?

(I'm using the 7.0.1 version of both services and curator 5.7.6) (我正在使用服务的7.0.1版本和策展人5.7.6)

As far as I know the index is just a file on the OS using a GUID as the file name. 据我所知,索引只是操作系统上使用GUID作为文件名的文件。 So when you restore these files will be recreated nulifying all the objects referring to these indices. 因此,当您还原这些文件时,将重新创建所有引用这些索引的对象。 The only way to fix this is to edit the objects by going to saved objects and modify the index used with the latest GUID key. 解决此问题的唯一方法是通过转到已保存的对象来编辑对象,并修改与最新GUID键一起使用的索引。 To navigate to the object go to Management and then Saved Objects. 要导航到该对象,请转到管理,然后单击保存的对象。 Find the object in question. 查找有问题的对象。 Click on the three dots, select inpect. 单击三个点,选择检查。 Normally this is a problem for visualisations so what I do is edit the Reference portion and past in the new GUID as the value of "id" See the example below. 通常,这对于可视化来说是个问题,因此我要做的就是编辑“参考”部分,并将其作为“ id”的值放在新的GUID中,请参见下面的示例。

[
  {
    "name": "kibanaSavedObjectMeta.searchSourceJSON.index",
    "id": "71eacc40-fa33-11e9-be5b-a960e3c83f4d",
    "type": "index-pattern"
  },
  {
    "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index",
    "id": "71eacc40-fa33-11e9-be5b-a960e3c83f4d",
    "type": "index-pattern"
  }
]

I know this does not fully answer your question but does give solution to fix issue after restore. 我知道这不能完全回答您的问题,但是确实提供了解决问题的方法,可在还原后解决此问题。 btw. 顺便说一句 I am using Kibana 7.4.0 我正在使用Kibana 7.4.0

If you have allot of visualisations then this could become a big job. 如果您具有可视化效果,那么这可能会变得很艰巨。 Maybe someone else knwows how to bulk edit these configs externally. 也许其他人知道如何从外部批量编辑这些配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM