Deploying Kibana indexes, searches, visualization and dashboard in production

(Chinmoy Das) #1

I have developed some searches, visualization and dashboard in Kibana in development environment. How can I package it, such that the package can be deployed in production. I am looking for something similar to java jar files, that we deploy in different environments.

(Mark Walkom) #2

Take a snapshot and restore it, or extract the json docs from the index and then insert them.

Otherwise this has been asked before so there's a few other examples you can dig up :slight_smile:

(Graham Hannington) #3

Otherwise this has been asked before so there's a few other examples you can dig up

Could you please provide specific links? I've searched here for "deploy dashboards" (and variations of those search keywords), but - my problem; I don't doubt you - I've not found any answers in these discussion forums.

To deploy dashboards via a GitHub repo, I reused scripts provided with a GitHub repo from Elastic, elastic/beats-dashboards.

I'd very much like to be told I'm missing something here, because I'm frankly dismayed by how little built-in support the Elastic Stack (specifically, Kibana) offers in this context.

I developed some dashboards in an Elastic Stack (Kibana 4) instance. That instance was shared with other users who were also developing their own dashboards. I wanted to publish a selection of "my" dashboards, so that other users could load them on their instances.

Before I tried it, I expected that, if I exported a dashboard (to a JSON file), Kibana would also export the visualizations and searches used by that dashboard (or at least, offer an option to do that). Nope. Not unless I'm missing something.

In practice, it was up to me to pick out the definitions from all of the others (created by me and other users) and ensure that I didn't miss any. Kibana doesn't help you with this. And - I really want to be wrong about this - I don't think this situation has changed in Kibana 5. I ended up adding a keyword to the description field of each related definition; a colleague wrote a Python script that uses the Elasticsearch HTTP API to extract all definitions with that keyword.

Finally, before you can use the loaded dashboards in a new Kibana instance, you need to configure the index patterns used by those dashboards. This is possible now, but not yet via a purpose-built API.

What a palaver. Please point out any factual errors I've made; and please suggest better ways to do this, including a roadmap (I've seen issue #8293).

By contrast, to do the equivalent thing (deploy a dashboard) in Splunk, I copy a single app directory (that encapsulates all of the related definitions).

P.S. Re: that "unload" Python script I mentioned. I recognize that manually adding a keyword to related definitions, and then extracting definitions that contain that keyword, is a kludge. I was considering developing myself a tool that gets a dashboard definition, parses it for referenced viz and search IDs, and then extracts them, too, but I baulked; not because I couldn't do it (I've written similar tools), but because I felt that surely Elastic must recognize this as a high-priority common use case that needs to be addressed, and I wouldn't have long to wait until Kibana provided this functionality.

(system) #4