Hi,
I have an issue related to importing Kibana dashboard. My dashboard contains visualizations from different indices. When I import & export the dashboard using UI everything works fine. But when I export and then import the dashboard using API the visualizations are not displayed and they prompted the following error
Could not locate that index-pattern (id: .....
I also noticed that when I import the dashboard using the API with /import?exclude=index-pattern
as in
#curl -X POST -H "Content-Type: application/json" -H "kbn-xsrf: true" -d @$kibana_dashboard ${kibanaurl}/api/kibana/dashboards/import?exclude=index-pattern
The visualization works fine but replications of the index patterns are generated. I guess these auto-generated index patterns correspond to the old indices in the kibana dashboard.
I wonder if there is a way to make the import works without auto-generate the index patterns.
To add more details.
I am using elasticsearch 7.3.2 and Kibana 7.3.2
My pipeline as follows:
- Cleaning any previous elastic indices
- index all my file using elastic api _bulk
- register all the indices as kibana index patterns
- import the kibana dashboard
Note: I am using the same title for indices that kibana dashboard has.
I want an automatic way to recreate the index patterns that the visualizations in the imported dashboard are using and are missing.
Thanks