Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 export.json file. When importing an export.json file into another kibana index, Kibana reports errors Could not locate that index-pattern-field (id: <index-pattern name>).

How do you migrate kibana's index-patterns from one Elasticsearch instance to another?

Thanks,

Nathan

like image 262
Nathan Reese Avatar asked May 24 '16 20:05

Nathan Reese


People also ask

Where are Kibana index patterns stored?

Hey @Rosho, index-patterns are not stored on the Kibana server's filesystem. Instead, they are persisted to a document in the . kibana_* indices (which the . kibana alias points at).

How do I export data from Kibana?

From the raddec index choose the fields of data you want to export by feeding the Selected Fields list. Add an Available field by clicking the Add button when the mouse is over it. Once the Selected Fields list is complete, Save it from the top menu bar. Choose a Name that will be the name of the CSV file generated.


1 Answers

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

like image 70
Val Avatar answered Sep 28 '22 05:09

Val