Kibana: export pre-configured dashboard as pdf/png

We have the following use cases for working with Kibana:

Use Case 1
We run automated performance tests using a Jenkins pipeline. We would like to be able to import a pre-configured dashboard at the start of the test, run the test, and then export the now populated dashboard as a pdf or png, for analysis by engineers. This is something which is supported in Grafana. Note that the ELK stack in this instance would be deployed in Kubernetes.

Use Case 2
We have found an issue in production and the support engineer needs a dump of all the logs/statistics from the relevant time period. Using just curl, export all relevant data to csv file, or generate a pdf report from a dashboard for the relevant period. Note that the Kibana UI is often not accessible in a production environment.

Use Case 3
We want to provide data from a performance test run to other parties for analysis (for example sizing our applications e.g. how many servers to run this application) in csv format.

Kibana currently supports export of dashboards but it is not something which can be automated. It requires the user to open the UI and pick up a Post URL, and then paste that in as a parameter to curl. This is something which can't be integrated into a jenkins pipeline.

Are there any plans to support these kinds of use cases?

All of these use cases can be covered with the current state of Kibana.

The Post url is meant to be used for automation use cases. You can fire this post url from within your Jenkins job as well.

See this tutorial: Automating report generation | Kibana Guide [7.11] | Elastic (this also works for CSVs from Discover)

It's basically copying the URL once, then putting it into a shell script pipeline step in your Jenkins job

To import a pre-configured dashboard, check out the saved objects API: Import objects API | Kibana Guide [7.11] | Elastic

1 Like

Hi Joe,

Does the POST URL survive across multiple installations of the ELK stack? It doesn't look like something that is portable across different environments. The ELK stack would be provisioned as part of the Jenkins pipeline.

John

If you are importing the same saved objects used for the csv/dashboard via saved objects API, the URL won't change. Except for ips/hostnames/credentials of course - you will have to fill them in dynamically in your script (but ids and the rest of the URL will still work)

1 Like

Hi Joe,

I don't have a solution for the use case above where all data for a particular time period is exported to csv to supply to a support engineer. Would you have any recommendations/ideas for that? You can collect CSV for individual queries, but in practise, a dashboard could be made up of hundreds of queries. So really I am just looking for a stats/logs dump between timestamp A and timestamp B.

John

The reporting CSV export works for raw documents - go to Discover, configure your search (with or without queries), then go to Share > CSV