Search code examples
elasticsearchkibanakibana-4elasticsearch-2.0

Kibana : Is there a way to get dashboards from command line?


In Kibana Settings/Objects menu, i can see all of my dashboards, charts and searches.

I can choose to export one or more of them and then i get a JSON object representing that item.

Is there a way to do this from command line? Where are the dashboards stored in elasticsearch? Is there a way to access them using the .kibana index?


Solution

  • You can get complete Kibana metadata from command line using cURL. Only thing you need to have is access to Elasticsearch.

    Elasticsearch stores complete Kibana metadata in .kibana (default and if you want it to store in new index then you can configure it in kibana.yml). Using Elasticsearch GET API you can retrieve index-patterns, visualizations, dashboards, kibana settings etc.

    Examples to get Kibana visualizations and dashboards:

    curl -XGET "http://xxx.xxx.xxx.xxx:9200/.kibana/dashboard/dashboard_name?pretty=1"
    curl -XGET "http://xxx.xxx.xxx.xxx:9200/.kibana/visualization/visualization_name?pretty=1"
    

    Hope this Helps!