Our Blog

Export and Import Kibana Dashboards, Searches & Visualizations

Manually recreating Kibana dashboards, searches, and visualizations during upgrades, production deployment or recovery is a time-consuming affair. The easiest way to recreate the prebuilt Kibana dashboard and other objects is by exporting and importing dashboards, searches, and visualizations. This can be achieved by using:

  • Kibana API (available since Kibana 7.x) 
  • Kibana UI

If you are looking to export and import Kibana dashboards and their dependencies automatically, we recommend using the Kibana API. You can also export and import dashboards directly from the Kibana UI. 

Note: When using the Kibana UI to export or import dashboards, you should individually include the dependencies, such as visualizations and index patterns.

Export Objects From Kibana API

The export API enables you to retrieve a set of saved objects that can later be imported into Kibana.

Request

POST /api/saved_objects/_export

Request Body

At least type or objects must be passed in within the request body.

type (optional)

(array/string) The saved object type(s) that the export should be limited to.

The following example exports all index pattern saved objects.

POST api/saved_objects/_export { “type”: “index-pattern” }

Example Curl:

curl -X POST “http://localhost:5601/api/saved_objects/_export” -H ‘kbn-xsrf: true’ -H ‘Content-Type: application/json’ -d’ { “type”: “index-pattern” } ‘

objects (optional)

(array) A list of objects to export

The following example exports specific saved objects.

POST api/saved_objects/_export

{

  “objects”: [

    {

      “type”: “dashboard”,

      “id”: “be3733a0-9efe-11e7-acb3-3dab96693fab”

    }  ]

}

Example Curl:

curl -X POST “http://localhost:5601/api/saved_objects/_export” -H ‘kbn-xsrf: true’ -H ‘Content-Type: application/json’ -d’ { “objects”: [ { “type”: “dashboard”, 

“id”: “be3733a0-9efe-11e7-acb3-3dab96693fab” } ] } ‘

Response Body

The response body will have a format of newline delimited JSON and the successful call returns a response code of 200 along with the exported objects as the response body.

Import Objects From Kibana API

The import API enables you to create a set of Kibana saved objects from a file created by the export API.

Request

POST /api/saved_objects/_import

Request Body

The request body must be of type multipart/form-data.

File

A file exported using the export API.

Example

The following example imports an index pattern and dashboard.

curl -X POST “localhost:5601/api/saved_objects/_import” -H “kbn-xsrf: true” –form [email protected]

The file.ndjson file would contain the following.

{“type”:”index-pattern”,”id”:”my-pattern”,”attributes”:{“title”:”my-pattern-*”}}

{“type”:”dashboard”,”id”:”my-dashboard”,”attributes”:{“title”:”Look at my dashboard”}

Response Body

A successful call returns a response code of 200 and a response body containing a JSON structure similar to the following example:

{

  “success”: true,

  “successCount”: 2

}

Export Objects From Kibana UI:

You can now export your objects from Kibana UI under Management > Saved Objects > Export. Select the checkboxes of the objects you want to export, and click Export. Or to export objects by type:

  • Click Export objects.
  • Select the object types you want to export.
  • Click Export All.
kibana dashboards

Import Objects From Kibana UI:

 You can import your JSON file from Kibana UI under Management > Saved Objects > Import. Follow the below steps to import your 

  • Click Import.
  • Navigate to the JSON file that represents the objects to import.
  • Indicate whether to overwrite objects already in Kibana.
  • Click Import.
kibana

Summary

While manual export and import using the Kibana UI is an option, automating the process through the Kibana APIs can make it even simpler and more efficient. Exporting and importing saved objects from Kibana is an effective and easy way to recreate dashboards and other objects in new environments or during migrations.

If you are looking to automate and streamline the process, we recommend using the Kibana APIs. Alternatively, you can use the Kibana UI for more granular export and import operations. This approach can save you significant time and effort, especially when dealing with large and complex datasets.

Why Try Skedler for Your Kibana Reporting Solution?

If you are seeking a reliable Kibana reporting solution, Skedler offers an easy-to-use, scalable, and affordable option that simplifies the entire reporting process. Here’s why Skedler could be the perfect fit for your business:

  • Customization: Skedler allows you to customize your report layouts and create your own templates, enabling you to personalize reports for each user and tailor them to specific needs.
  • Ease of Use: The platform is designed to be intuitive and user-friendly, making it easy to generate reports from searches and data tables without a steep learning curve.
  • Automation: Skedler automates the reporting process, including data extraction, scheduling, and seamless distribution of reports to end-users. Connect Skedler to Kibana, set your reporting frequency, and enjoy a streamlined, error-free experience.
  • Cost-Effective: Skedler is an affordable solution that delivers exactly what you need without overwhelming your budget. Plus, it offers robust support to ensure that your reporting solution is fully functional without incurring extra costs.

Try Skedler today! 

Automate your Grafana Grafana and  Kibana Reports Today!
Reporting Made Simple.

Start your free trial
 
 
 
 
 
 
 
 
 
Kibana

Start your 15-day free trial with instant download

Automate what’s slowing you down. Focus on what fires you up.

Copyright © 2024 Guidanz Inc
Translate »