How to provision dashboards into kibana

elasticsearchkibanalogginglogstashsaltstack

I am giving my developers the gift of kibana using the elasticsearch that is bundled with logstash. They will have kibana in their vagrant boxes.

Goal: Install and configure kibana dashboards via scripts on startup.

Problem: How to pre-load exported dashboards into elasticsearch embedded in logstash?

I have downloaded the dashboards, let's call the file: "fancy.json". Once logstash is up and running how can I automate loading fancy.json into elasticsearch?

Best Answer

I never figured this out.

Instead I now copy the exported dashboard into /opt/kibana/app/dashboards/company.json and set the default dashboard in /opt/kibana/config.js to point to it.