Reporting and Exporting Data
Share:
Kibana stands as one of the most well-regarded interfaces for visualizing data hosted in Elasticsearch indices. It provides a substantial slew of features: data visualization, query execution, dashboard customization, and more. Reporting is an essential benefit of Kibana which gives you the latitude to export your visualizations, search results or dashboards into a PDF document. This is perfect for keeping records or sharing data insights with team members who might not have direct access to Kibana.
Kibana also offers other options for exporting data. The most common is the CSV Export feature, which allows you to export raw data from your saved searches into a comma-separated value format, suitable for importing into spreadsheets or other data analysis tools. Today, we'll be exploring how to use these features efficiently, using a fictional dataset of movie characters for our examples.
Let's start by installing Kibana, if you haven't yet, and loading up our indices with some fictitious data.
Exporting Raw Data into CSV
To demonstrate the CSV export feature, we'll first create a new saved search. Suppose we're working with a dataset of movie characters, and we're interested in the character's names and the movies they're featured in.
Creating a new search requires managing to the 'Discover' section in Kibana and choosing the appropriate index. For our example, we'll choose the 'movies' index and apply filters to view the 'character names' and 'movie names'.
After applying the filters and gaining the desired search results, save the search with an identification name; 'character_movie_search'. For saving the search, click on 'Save' adjacent to the search bar and input the search name in the ensuing dialogue.
Having our desired search saved, we can now export these results to a CSV file. The process is straightforward:
- Navigate to the 'Saved Searches' section under the Management tab.
- Click on the 'Export' button in the row of your saved search. Immediately, Kibana will start creating a CSV file based on your search results.
You can also generate a CSV from within the Discover section where you saved the search. On top of the screen, click on the icon of 'Sharing' and select the option of 'CSV Reports'. Following that, click on the 'Generate CSV' button.
Note: The volume of data and how soon the export occurs is contingent on multiple factors including the size of the exported data, the load on Elasticsearch, and the CSV Export settings of Kibana.
Management Tab > Saved Searches > Export
or
Discover > Sharing > CSV Reports > Generate CSV
Generating Reports
The Reporting feature in Kibana affords you the chance to export your search results, visualizations, and dashboards into a PDF document.
Let's say you've created a visualization, 'characters_per_movie', which displays the number of characters per movie from the 'movies' index. Here's how to export this as a report:
- Navigate to the dashboard or visualization you aim to export.
- Click the "Share" button at the top of the page.
- Select 'PDF Reports'
- Press 'Generate report'
You can keep track of the generation of your reports through a toast-notification interface at the top. Or, you may maneuver towards the Reporting section in the Management tab, presenting progress status, and a platform to download completed reports.
Dashboard > Share > PDF Reports > Generate report
Automated Reporting
If you need reports generated regularly, Kibana's 'Watcher' feature steps in to automate the process. A 'Watch,' essentially an automated task, can be set to execute actions based on certain conditions, including generating PDF reports.
Suppose we repeatedly need the 'characters_per_movie' visualization in a report. Here's how you can set up a watch to do this:
- Navigate to the Management tab and click on 'Watcher.'
- Click 'Create watch.'
- Provide a watch Name and Schedule, let's say 'movie_character_distribution' for the name and '0 0 6 * * ?' for daily reports at 6 am.
- Choose the 'Reporting' action type and choose our 'characters_per_movie' dashboard.
- Set up your desired condition and action. Typically, the condition would be set to 'Always' and the action would be 'Email,' prompting Kibana to email the report to a certain address.
With these steps completed, Kibana will automatically generate and email the report at a frequency you specify.
Management > Watcher > Create watch > [follow steps] > Save
This just touches on the capabilities and functionalities of Kibana's Reporting and Exporting features, which will serve you usefully depending on the requirements particularized to your data management and accessibility needs. Get hands-on, explore, and you will discover how to squeeze the most out of these features. Happy Kibana-ing!
0 Comment
Sign up or Log in to leave a comment