Issue in exporting Dashboard and visualizations

can you please give a clarity what all can i export with the dashboard......with the dashboard i can get related saved searches , related visualizations and related index pattern as well is it?

I think I tested this a while ago, and believe everything related to my dashboard (index pattern, visualisations and saved searches) was successfully exported. Is this not the case for you? Which version are you on?

the dashboard i have tested is not having saved searches....i would like to test it once again and i am using version 6.0
i will test it once again and approach you if i have any queries

Thank you Christian_Dahlqvist

Hi Christian_Dahlqvist,
what you said is correct i am able to export associated index pattern, associated saved search and associated visualizations but not the index template
except index template able to export everything.

i need index template also to be exported...how can i do that?

Index templates are not linked to visualizations or dashboard in any way, so you will have to export them separately from Elasticsearch. Kibana does not really care about index templates as they are used by Elasticsearch when creating new indices.

yeah how can i link that particular index pattern with associated index template and export it?

Given that index templates can contain varying wildcard patterns to match the indices to apply to, I do not think there is any easy way to do that.

index templates can contain varying wildcard patterns to match the indices
can you give an example for the above statement

Assume I have an index pattern in Kibana defined as filebeat-*. The pattern specified in the index templates could vary quite a lot and still match this pattern, e.g. *, file*, f*, *beat* and *-*. Depending on what the index naming convention is, it could even be that a *2018* pattern would apply even when it is not part of the pattern specified in Kibana.

If you have some patterns for how you define and use index templates it may be easier, but handling this in a general way is hard.

yeah i had custom pattern and i have created template to my index now suggest me how to export the associated template from elasticsearch

as you said it is easier

You will need to use the index template APIs to identify and get the relevant templates.

Okay i will try Christian Thank you

Christian i would like to export both the index template and index as well with the dashboard
so using kibana api not able to export index template and index
as you said using template api i can get one particular template and its related one index which i know manually but i need few dashboards related index templates and indices

so based on dashboard uid can i get its related indices and its templates?

As index templates are not related to dashboards, I suspect you will need to create a script to do it based on the APIs I linked to.

" index templates are not related to dashboards" i agree with this
but how can i recognise the index template and index of those specific dashboards and export them through api's placing in script

I do not know. If you have some convention around how you set up patterns in index templates, you may rely on that. If the patterns can be anything, it will be difficult, as I highlighted with my example.