Load index-pattern, dashboard, searches from file

Application must be loaded automatically without human intervention.
From other replays on this forum suggest coping .kibana index.
So i devised a little script which
adds template indexes,
bulk insert .kibana index that was exported from development instance,
then adds some data.

And it works, mostly...

Sometimes it takes me to add index-pattern page?
Is there some middle step I am missing here, or could it be just some cache?

If you look at this comment: https://github.com/elastic/kibana/issues/3709#issuecomment-349335920 you will see an example of how to create an index pattern in Kibana via API call. I had to adjust the URL myself to include the context root for Kibana. My current Kibana root is: http://localhost:5601/kmz/app/kibana so I made the api call to /kmz/api... Note that the kmz portion of that URL will change every time you restart kibana.

Thanks,
Adjusted script from response works for me in 6.2.

Maybe not under this topic, but:

Could I get an export without clicking?

That is somewhere on our roadmap for sure, as many people ask for it.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.