Skip to content

Exercise 5: Kibana visualizations

The purpose of this exercise is to use the data visualization capabilities of Kibana.

Screenshots

The following exercises will ask you to create visualizations, then export their Kibana description as JSON, and create a screenshot of the visualization itself. When creating the screenshot, make sure the entire visualization with the legend is visible.

Create an Index pattern

Our first step is to tell Kibana which indexes it should consider when creating the visualizations.

  1. Click on the Visualize Library tab on the left side menu.

    Kibana Visualize Library

    When opening this page the first time, you will be asked to configuration a new index pattern.

  2. Click the Create new index pattern button. Enter the index name — salaries — as the index pattern. Make sure Kibana says Success! Your pattern matches 1 index, and click Next step.

    Kibana index pattern

  3. Select I don't want to use the time filter as Timestamp field since we will not use this function during the exercises. Click on Create index pattern.

    Kibana index pattern

  4. Now click on the Visualize Library in the menu again to see the following.

    Kibana create the first visualization

a) How many people did KFC hire each month? (vertical bar chart)

  1. Click on the Create new visualization button on the Visualize tab, and use the Lens visualization.

    Kibana Lens visualize

  2. This will bring up an editor where the visualization can be built using drag and drop. Select the type in the middle and the content on the right side of the editor. Start by specifying the type as Bar vertical and confirming the index on the right, which is salaries.

    Kibana Lens builder properties

  3. Set the Horizontal axis to display a Date histogram with the following settings:

    • Field should be hired
    • Minimum interval should be month
    • Custom Label should be Month.

    Kibana horizontal axis

  4. Then set the vertical axis to display the Count of Records with display name People hired.

    Kibana vertical axis

  5. The graph will be empty after these configuration because we need to select a time window too. In the upper right corner click into the time selector and display everything since Jan 1, 2009. (Click into the time field textbox to get the selector as below.) Then click Update and the diagram should now display the bar chart.

    Kibana vertical axis

  6. The last thing that is missing is a filter. In the top left corner, click on the Add a filter link and filter for company "KFC" (with the appropriate prefix): use the following settings to create the filter. Click on Save to save the filter.

    Kibana filter

  7. The configuration of the visualization is now ready. You see the preview of the visualization. Click on the Save button in the top right corner to save the visualization with title 5_a (without adding it to any dashboard).

    Kibana save visualization

    SUBMISSION

    Create a screenshot of the visualization preview and save it as ex5-a.png. Make sure that the filter, including your Neptun code, is visible on this screenshot.

    Click on the Stack Management tab in the left side menu (at the very bottom), and choose the Saved Objects option. Select and export the visualization you just saved — no need to include related objects. Save the downloaded file as ex5-a.ndjson.

    Kibana export

b) Show the gender and age distribution of the workers! (pie chart)

  1. Go back to the Visualize Library page and create a new visualization.

  2. Select Pie as the chart type.

  3. First, add a Slice by the top values of the gender field, then another slice by intervals of the age field. (The intervals should be large anough so that the final vizualization is similar to the one below.) And finally, the Size by should be the count of records.

    Kibana Buckets

SUBMISSION

Create a screenshot of the resulting visualization and save it as ex5-b.png. Use the previous method to save and export the visualization. Save the exported file as ex5-b.ndjson.

c) Show the distribution of the workers' locations on a map!

  1. Create a new visualization, this time, it should be a Map type.

  2. On the right add a new layer of type Choropleth with the following settings>

    Kibana Map visualization

SUBMISSION

Create a screenshot of the result and save it as ex5-c.png. Save and export the visualization. Save the exported file as ex5-c.ndjson.

Back to top