Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import, export and clone saved objects #1552

Closed
TiNico22 opened this issue Oct 7, 2014 · 68 comments · Fixed by #3573
Closed

Import, export and clone saved objects #1552

TiNico22 opened this issue Oct 7, 2014 · 68 comments · Fixed by #3573

Comments

@TiNico22
Copy link

TiNico22 commented Oct 7, 2014

As visualize configuration can be more complex in Kibana 4 than in 3 and visualize are part of dashboard, import / export feature should be great to share visualize with other people.

Update: request applies to dashboard as well, see #1551

@spalger
Copy link
Member

spalger commented Oct 7, 2014

Are you trying to share with someone who has access to your elasticsearch cluster? If so, that's as easy as sending your url.

There's also this little button:
image

@spalger
Copy link
Member

spalger commented Oct 7, 2014

That said, I personally don't think sharing a visualization from one cluster to another would be too useful, since the other person will have different data, indices, fields, etc.

It might be useful for tutorials, or blog posts, but even then the author could provide just the hash part of the url.

Thoughts?

@otisg
Copy link

otisg commented Oct 7, 2014

Cross-cluster sharing may not work, but sharing the URL with people who have access to the same cluster/index is handy!

@TiNico22
Copy link
Author

TiNico22 commented Oct 7, 2014

I was talking of the export shema feature from kibana 3
sans titre
Idem for the load feature from kibana 3.
The same apply for visualize and dasboard

We are sharing dashboard shema without other people whitout having network access to each other ELK servers. This helps, as blog post & tutorial samples, to start a new deployement with some sample from friends without having to rewrite everything.

@robozu
Copy link

robozu commented Oct 29, 2014

As a workaround you can go to settings -> objects -> visualizations and copy all the fields from there and paste them into another search (create a new one and save it) even on another elk server

@TiNico22
Copy link
Author

TiNico22 commented Oct 29, 2014

@robozu thanks for the advice
Not as easy as the export schema from K3. It works also for dashboard.
But with K3, exporting a dashboard was the equivalent of exporting a dashboard + all related visualize in K4
The major issue is, if I have a lot of visualize, to export once by once. I would rather have an "export all my visualize" feature.

@nabheet
Copy link

nabheet commented Dec 31, 2014

Also, if I have mutiple environments like Dev, Test and Production with separate ELK infrastructure, this feature would be nice so we can migrate visualizations from environments. Unless there is another way to accomplish the same task.

@abh1nav
Copy link

abh1nav commented Jan 8, 2015

+1 for the dashboard export feature - really handy for being able to move between dev, test and prod

@leonardpunt
Copy link

leonardpunt commented Jan 14, 2015

+1, for the same reason as mentioned by @abh1nav

@calaldees
Copy link

calaldees commented Jan 19, 2015

+1

1 similar comment
@t3chn0m4g3
Copy link

t3chn0m4g3 commented Jan 19, 2015

+1

@spalger
Copy link
Member

spalger commented Jan 20, 2015

related issues: #2100 and #2695

@rashidkpc rashidkpc changed the title Import / export visualize is missing Import, export and clone saved objects Jan 21, 2015
@rashidkpc rashidkpc added this to the 4.1.0 milestone Jan 21, 2015
@agirbal
Copy link

agirbal commented Jan 21, 2015

Copying comment from related ticket:
URLs are great way to share but can get messy.
Some users are used to manipulating dashboard through JSON, which makes it easy to modify parameters cleanly. Some info here:
http://blog.trifork.com/2014/05/20/advanced-kibana-dashboard/
Additionally can be useful to share searches and visualizations.
thanks!

@shayts7
Copy link

shayts7 commented Jan 22, 2015

+1

@niemyjski
Copy link

niemyjski commented Jan 23, 2015

We really need the ability to import and export dashboards to a gist. We have an open source project that uses es and it's really nice for us to send our customers hosting locally a nice looking dashboard..

@matthewgaulin
Copy link

matthewgaulin commented Jan 24, 2015

+1 to help with dev/test/prod synchronization

@wadewilliams
Copy link

wadewilliams commented Jan 26, 2015

👍 @spenceralger: re:

"I personally don't think sharing a visualization from one cluster to another would be too useful, since the other person will have different data, indices, fields, etc."

For our use case, we have several elasticsearch instances that share the same indices and fields, but different data. So while the the data changes, the format won't. This would be super helpful.

Thanks all

@w33ble
Copy link
Contributor

w33ble commented Jan 26, 2015

👍

@wadewilliams
Copy link

wadewilliams commented Jan 26, 2015

FYI: We were able to work around this by using Elasticdump -- simply pull the .kibana mapping and data from one instance and shove it into another :)

@JohnGarbutt
Copy link

JohnGarbutt commented Feb 11, 2015

So I really liked the kibana 3 ability where you have a set of "static" dashboards stored in json files on disk, and managed via config management, rather than everyone being able to change everything inside the elasticsearch index.

@BeniGal
Copy link

BeniGal commented Feb 13, 2015

+1

@ch40s
Copy link

ch40s commented Apr 16, 2015

+1000 :)

@davidbono
Copy link

davidbono commented Apr 20, 2015

👍

@mserdur
Copy link

mserdur commented Apr 22, 2015

+1

1 similar comment
@Inderjeet26
Copy link

Inderjeet26 commented Apr 23, 2015

+1

@ferranmunoz
Copy link

ferranmunoz commented May 4, 2015

+1 for dev/test/prod synchronization
For now I am using elasticdump.

@milanchandna
Copy link

milanchandna commented May 13, 2015

+1 very helpful to share the basic dashboard/visualizations. sharing to get new users quickly get started. And not sharing the url to avoid conflicts from modifications. each user should have their own copy instead of sharing one.

@ghost
Copy link

ghost commented May 19, 2015

+1 Read it being available from 4.1.0 release

@hex0cter
Copy link

hex0cter commented May 26, 2015

+1

@nocturnal3d
Copy link

nocturnal3d commented Jun 2, 2015

+1 we have multiple deployed environments before we productionise the dashboards.

@Guinoutortue
Copy link

Guinoutortue commented Jun 2, 2015

For the moment I use the following script with a crontab every night! You have to create a folder /home/kibana-backups/

#!/bin/sh
#save_kibana_task.sh
#take a parameter for naming the backup

/usr/bin/curl -XPOST localhost:9200/.kibana/_close
/usr/bin/rm -R /home/kibana-backups/.kibana-$(date +\%d\ )
/usr/bin/cp -R /var/lib/elasticsearch/<your_CLUSTER_name>/nodes/0/indices/.kibana /home/kibana-backups/.kibana-$(date +\%d\ )
/usr/bin/curl -XPOST localhost:9200/.kibana/_open

sh save_kibana_task.sh <suffix_name_for_backup>
And you can restore with this :

#!/bin/sh
# restore_kibana_task.sh

elasticcluster=<your_CLUSTER_name>

/usr/bin/curl -XPOST localhost:9200/.kibana/_close
/usr/bin/rm -R /var/lib/elasticsearch/${elasticcluster}/nodes/0/indices/.kibana/*
/usr/bin/cp -R /home/kibana-backups/.kibana-$1/* /var/lib/elasticsearch/${elasticcluster}/nodes/0/indices/.kibana/
/usr/bin/chown -R elasticsearch:elasticsearch /var/lib/elasticsearch/${elasticcluster}/nodes/0/indices/.kibana
/usr/bin/curl -XPOST localhost:9200/.kibana/_open

sh restore_kibana_task.sh <suffix_name_for_backup_to_restore>

Of course give them necessary right for bash script +x!!!
You can copy a folder to an other server and restore. Sometimes you will need to restart elasticsearch after a restore.
(For Linux / sorry Windows users :-( )

@jim-davis
Copy link

jim-davis commented Jun 23, 2015

I wrote a Ruby script that can copy a dashboard, its visualizations, and their saved searches from one Kibaba 4 cluster to another.
https://github.com/jim-davis/kibana-helper-scripts

@ajay2881
Copy link

ajay2881 commented Jun 24, 2015

Hi Jim, How to use the script?

@jim-davis
Copy link

jim-davis commented Jun 24, 2015

It's a ruby script intended to be run from the command line on Linux.
To use it you must first install the Ruby language on your workstation.
If you have ruby, you can run the script by executing

ruby copy-kibana-dashboard.rb --help

You will need to know the host and port of the source and destination ES clusters
and the ID of the dashboard

example

ruby copy-kibana-dashboard.rb --from-host old-cluster-host --to-host
new-cluser-host --dashboard myDashboard

On Wed 24/06/15 10:16 AM , ajay2881 notifications@github.com sent:

Hi Jim, How to use the script?


Reply to this email directly or view it on GitHub [1].

Links:

[1]
#1552 (comment)

@ajay2881
Copy link

ajay2881 commented Jun 25, 2015

Thanks Jim

@WCMinor
Copy link

WCMinor commented Jul 15, 2015

+1 built in export/import

@carlosvega
Copy link

carlosvega commented Jul 17, 2015

+1

3 similar comments
@ddes
Copy link

ddes commented Jul 27, 2015

+1

@EliasGoldberg
Copy link

EliasGoldberg commented Aug 13, 2015

+1

@wasmum
Copy link

wasmum commented Aug 26, 2015

+1

@wasmum
Copy link

wasmum commented Aug 26, 2015

The issue is not dumping and restoring, but importing a dashboard you had on 3 to 4 or from machine to machine without having to mess alter the index.

+1

@lukasolson
Copy link
Member

lukasolson commented Aug 26, 2015

We won't be supporting export/import from Kibana 3 to Kibana 4. However, you can currently import/export from one machine to another. See #3573.

@ShayanZafar
Copy link

ShayanZafar commented Oct 14, 2015

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.