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

command line load dashboard #333

Closed
oweng opened this issue Aug 7, 2013 · 14 comments
Closed

command line load dashboard #333

oweng opened this issue Aug 7, 2013 · 14 comments

Comments

@oweng
Copy link

oweng commented Aug 7, 2013

Hi,

I was wondering if there is a way to load a dashboard from the command line? Is there a URL that I could use with curl to do this?

Thank you,

Geoff

@rashidkpc
Copy link
Contributor

There is no way to load a dashboard from the command line, Kibana requires a modern browser environment

@dadoonet
Copy link
Member

dadoonet commented Aug 8, 2013

That said, I think you can use something like the following (tested on Mac):

open http://localhost:9200/_plugin/kibana/#/dashboard/elasticsearch/yourdashboardname

It will open a browser and open the right dashboard.

@oweng Is it what you are looking for?

@oweng
Copy link
Author

oweng commented Aug 8, 2013

Thanks guys, I think what I am looking for is:

  1. boot up a new server and install kibana
  2. when booting up, have a script replace the default dashboard with the one I created

I know this is a strange request, I am doing this as we pop up new environments where I just change the hostnames being queried in the dashboad JSON file. Just looking to see if there is a way to have that dashboard get loaded instead of the default logstash one. We currently are using kibana3 pre2, as I am a little behind on getting things moved over.

Thanks for your help.

Geoff

@dadoonet
Copy link
Member

dadoonet commented Aug 8, 2013

If I understand it, you only need to download the dashboard as a JSON file and reuse it when needed:

curl -XPUT http://localhost:9200/kibana-int/dashboard/youdashboardname -d '{
  // Your kibana dashboard here
}'

@oweng
Copy link
Author

oweng commented Aug 8, 2013

Oh, Okay, I get it. That makes sense. Sometimes I like to make things
difficult in my head. :)

Thanks for your help David! I really appreciate it.

Geoff

On Thu, Aug 8, 2013 at 2:14 PM, David Pilato notifications@gitpro.ttaallkk.topwrote:

If I understand it, you only need to download the dashboard as a JSON file
and reuse it when needed:

curl -XPUT http://localhost:9200/kibana-int/dashboard/youdashboardname -d '{ // Your kibana dashboard here}'


Reply to this email directly or view it on GitHubhttps://github.com//issues/333#issuecomment-22347984
.

@rashidkpc
Copy link
Contributor

Oh, I think I understand now. You can just replace dashboards/default.json with whatever dashboard schema you've exported

@oweng
Copy link
Author

oweng commented Aug 8, 2013

Perfect!

Sorry for all the confusion! This really helps.

Geoff

On Thu, Aug 8, 2013 at 3:56 PM, Rashid Khan notifications@gitpro.ttaallkk.topwrote:

Oh, I think I understand now. You can just replace dashboards/default.json
with whatever dashboard schema you've exported


Reply to this email directly or view it on GitHubhttps://github.com//issues/333#issuecomment-22355054
.

@ghost974
Copy link

ghost974 commented Jul 7, 2014

I'm trying to do the same, but with --data-binary @dashboard.json, it doesn't seem to work. I've exported a working dashboard, so it's not a syntax issue. Any advice ?

@oweng
Copy link
Author

oweng commented Jul 7, 2014

Have you tried this? This worked for me:

curl -XPUT http://127.0.0.1:9200/kibana-int/dashboard/dashboard-name -d
'content'

regards,

Geoff

On Mon, Jul 7, 2014 at 12:29 PM, Bastien Chong notifications@github.com
wrote:

I'm trying to do the same, but with --data-binary @dashboard.json, it
doesn't seem to work. I've exported a working dashboard, so it's not a
syntax issue. Any advice ?


Reply to this email directly or view it on GitHub
#333 (comment)
.

@ghost974
Copy link

ghost974 commented Jul 7, 2014

Doesn't seem to work, when I do a curl XGET, the format of a working dashboard compared to what I created is not the same. I see all return char are replaced by "" in a good dashboard.

By exporting the dashboard, i could restore it by copying it to app/dashboards/, i'm not sure how to get the good json format to import it through curl and give a file as parameter.

@brianlow
Copy link

This works for me

curl -s -X GET http://localhost:9200/kibana-int/dashboard/mydashboard/_source > mydashboard.json
curl -X PUT http://localhost:9200/kibana-int/dashboard/mydashboard -T mydashboard.json

Here is an example document:

{
    "user":"guest",
    "group":"guest",
    "title":"mydashboard",
    "dashboard":"here is the dashboard definition, this is the portion you get when exporting from the UI"
}

@kramach1980
Copy link

Is it possible to query elasticsearch/kibana to check if it received any data in the past 5 mins? If so, can someone guide me through the query that i can do in bash?

spalger pushed a commit to spalger/kibana that referenced this issue Mar 3, 2016
- load modules a *non* eager singletons to untangle circular references with Tribe nodes
- do not load modules if under tribe "proxy" nodes. this is detected by the "tribe.name" settings key.

Closes elastic#333
@SarahBourgeois
Copy link

SarahBourgeois commented Jun 10, 2016

I'm french so sorry for the bad English.
But if you want to load dashboard in command line you can with a script shell.
First you have to import vizualisation which permits to build your dashboard, and then import your dashboard too. (it's in JSon so).
After, You have to browse your files of vizualisation, then your file of dashboard, by creating a .kibana in which you have to insert these files formattant the json.
The index-pattern must be also created.
Besides, you have to insert data in the elastic-index to generate this dashboard.
I'm not sure you understand me, but if you want I develop a script which can do this.
Look my github if you want. I'm developping that and I have to commit the release beacause the first version is not complete.

@luckycse
Copy link

I am working where I am creating the json file having dashboard and visualization using some programs. so can any one please tell me how can I automate the json file directly into kibana without doing it manually.

harper-carroll pushed a commit to harper-carroll/kibana that referenced this issue Jul 11, 2016
w33ble pushed a commit to w33ble/kibana that referenced this issue Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants