How do you export/import “index-pattern” types in Kibana

后端 未结 2 1055
無奈伤痛
無奈伤痛 2021-01-14 17:17

Kibana 4.3 has great features for importing/exporting dashboards, searches, and visualizations. However, the related index-patterns are not contained in the the generated ex

相关标签:
2条回答
  • 2021-01-14 17:53

    For anyone trying to migrate an AWS elasticsearch instance from one cluster to a new one... (hope this helps...)

    I had a similar problem to the OP (I was trying to migrate data from one AWS Elasticsearch instance to a new one, using the AWS instructions). For some reason, restoration of the cluster would fail with the following cryptic error.

    "cannot restore index [.kibana] because it's open" 
    

    After much googling and head scratching, I decided it would be easier to migrate the .kibana index separately to the rest of the indices

    I tried @Val's awesome suggestion to use elasticdump , however, @Val's example didn't work for me.

    I ended up basing my command on the example from the elasticdump readme,

      elasticdump \
      --input=https://search-some-prod-instance.ap-southeast-2.es.amazonaws.com/.kibana \
      --output=https://search-other-prod-instance.ap-southeast-2.es.amazonaws.com/.kibana \
      --type=data
    

    After running this command, the indices from my old kibana were now available in the new kibana. (finally :p)

    nb: I also used the kibana "management->saved objects export / import" to migrate my visualisations, searches, dashboards, etc...

    0 讨论(0)
  • 2021-01-14 18:08

    From the official documentation (emphasis added)

    Exported dashboards do not include their associated index patterns. Re-create the index patterns manually before importing saved dashboards to a Kibana instance running on another Elasticsearch cluster.

    Since index patterns are saved in the .kibana index as well like anything else, what you can do instead of having to recreate them manually, is to save them using an adhoc tool, such as (e.g.) elasticdump, like this:

    elasticdump \
      --input=http://host1:9200/.kibana \
      --input-index=.kibana/index-pattern \
      --output=http://host2:9200/.kibana \
      --output-index=.kibana/index-pattern \
      --type=data
    

    You could also use snapshot/restore on your .kibana index

    0 讨论(0)
提交回复
热议问题