3

While working on new version of dashboards I need to leave previous versions unchanged. So I need to clone existing dashboard and save it as original name with some postfix - for example v.2.

I know there is possibility to clone dashboard in Kibana but it clones dashboard only. Meaning there will be two dashboard that will share same visualizations.

Is there an automatic way to clone visualizations too and make new cloned dashboard use those cloned visualizations?

Piotr Perak
  • 10,718
  • 9
  • 49
  • 86

2 Answers2

14

Just select "Save as a new visualization" when you save a visualization, and you will have your copy.

Michele Piccolini
  • 2,634
  • 16
  • 29
2

You can do this through the UI, but it's a lot of work. Since everything is just a document in Elasticsearch, it would be much easier to script this.

  • Read the dashboard (a GET operation by ID)

  • Read the visualizations on it (an MGET here)

  • Make a new copy of the visualizations, setting a new ID (the ID can be anything, Kibana
    just uses a UUID by default, you can do the same)

  • Make a new copy of the dashboard as above, and also change the IDs of the visualizations in it to the copies you just created

In a simple statement.

To copy visualization

  1. Export a visualization

  2. Opened the export file, Removed the id (it will get auto generated) and changed the name

  3. Save the file and import it

tshepang
  • 12,111
  • 21
  • 91
  • 136
Mak
  • 1,068
  • 8
  • 19
  • Could you try this out ? – Mak Jun 19 '19 at 10:18
  • I'm just starting with ELK. I don't know all the endpoints and so on. What I'm doing right now is I'm saving all objects under new name. Then edit new dashboard to use new visualizations. There is no way I can script it in reasonable time. Not yet. – Piotr Perak Jun 19 '19 at 10:21
  • Being new in Kibana too, would you provide the endpoints in your answer, as well as where the IDs to delete are located in the ndjson? The ndjson file is somewhat confusing at first view and needs some analysing. – Bob Jan 13 '20 at 18:35
  • source: https://discuss.elastic.co/t/can-i-copy-a-dashboard-and-its-associated-visulizations/94311/12 – Aydin K. Feb 22 '21 at 19:02