rfarley3 / Kibana

Kibana 4 configuration index interaction (.kibana index control, import and export of config, dashboards, visualizations, searches)
MIT License
18 stars 15 forks source link

Export do not include document of .kibana index where _type:index-pattern #10

Open Moosh-be opened 8 years ago

Moosh-be commented 8 years ago

As proposed in #9 , I've check dotkibana --export all --pkg but entries where _type:index-pattern is not in the exported json.

I see data I expected to found in export with this query GET /.kibana/_search?q=_type:index-pattern

When I export the kibana config, I can't import them in a new kibana because search need to found the index-pattern

So I need to manually create/define the index-pattern.

My need is to prepare the board in my local vagrant, and then share it via export. Other developers need to import the config into their local installation. It must also be able to import new board / visually / search in Kibana production and staging.

Moosh-be commented 8 years ago

ok I found what I need in this project : https://download.elastic.co/beats/dashboards/beats-dashboards-1.1.0.zip in save/kibana_dump.py

-> https://github.com/elastic/beats/blob/master/dev-tools/export_dashboards.py

rfarley3 commented 8 years ago

The provisoning of mappings and visualizations are two separate tasks. For instance, what if you restored a dashboard with out-of-date mappings, or deleted mappings with a skeleton index-pattern. For one project I'm on we use a skeleton index-pattern and post it with curl, then dotkibana --refresh to cache the mapping.

I could expand all to include a skeleton index pattern (without cached mappings), but I don't recommend saving the index-pattern. In fact, I should remove config if it is in all.

What is your use case? Maybe I'm not understanding your problem.

rfarley3 commented 8 years ago

I should mention that I use vagrant with ansible to provision kibana for that project.