Kibana Guide: Create a Dashboard and the First Lens Panel

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

Checked on 2026-11-11 against Kibana 9.5.x.

What you build

You create a new dashboard called Bookshelf (guides) and put one Lens panel on it, a bar chart that counts the Bookshelf log records for each HTTP status. The dashboard is the starting point of the later guides in this series, which add time series charts, metrics, controls and drilldowns to it.

Finished Kibana dashboard Bookshelf (guides) in view mode: one bar chart panel shows the count of log records for the status values 200 and 404

Before you start

  • Start the Kibana profile of the hands-on lab and wait about a minute:

    cd lab
    docker compose --profile kibana up -d
  • Open http://localhost:5601 and sign in as elastic with the password lab-elastic-password. When Kibana opens its full-screen welcome page, click Explore on my own.

  • Do the previous guide, Field statistics, patterns and ES|QL in Discover, and the guide that creates the data view, Upload a file and create a data view. This guide needs the data view Bookshelf logs (guides), with the index pattern logs-generic.otel-default and the time field @timestamp.

  • The load generator sends traffic to the Bookshelf service in its default mode, which fills the log data stream. Lens and dashboards need no licence beyond the basic one; the lab runs a trial licence anyway.

  • The guide was checked on Elasticsearch and Kibana 9.5.6. The figures are drawings of the Kibana 9.5 user interface, not screenshots, so small details can differ from your screen. A highlighted box with a number marks the control of the step with the same number.

Steps

Two screens are used. The first map shows the Lens editor; the second shows a dashboard in edit mode with the Add to dashboard flyout. Come back to them when a control is not where the figure shows it.

Map of the Kibana 9.5 Lens editor with seven numbered regions: the top actions, the data view and time row, the field list, the workspace with a bar chart, the header of the configuration panel, the layer card and the axis drop zones
Map of a Kibana 9.5 dashboard in edit mode with six numbered regions: the breadcrumbs, the page actions, the filter row, the canvas of panels, the Add to dashboard flyout and its Visualization entries

Open a new dashboard

  1. Click the menu button (Toggle primary navigation) at the left of the second bar.

  2. Under Analytics, click Dashboards.

    Kibana 9.5 with the primary navigation open: callout 1 marks the menu button of the second bar and callout 2 marks Dashboards under the Analytics section
  3. Click Create dashboard.

    Dashboards page of Kibana 9.5 listing the two sample dashboards, with the Create dashboard button marked by callout 3

Create the first visualization

  1. The new dashboard is in edit mode and says "This dashboard is empty. Let’s fill it up!". Click Create visualization ("Build charts, metrics, and tables with a point-and-click editor."). On a dashboard that already has panels, the Add button of the second bar opens the Add to dashboard flyout, where the same editor is the entry Visualization; Visualization (query) is the ES|QL editor of a later guide.

    New empty Kibana dashboard saying This dashboard is empty with two cards, Create visualization and Create visualization (query); the first card is marked by callout 4

Build the bar chart in Lens

  1. Lens opens with an empty workspace. Check that the Data view picker above the field list shows Bookshelf logs (guides). If it shows another data view, open the picker and choose Bookshelf logs (guides).

    Lens editor of Kibana 9.5 with an empty workspace, the field list at the left and the configuration panel at the right with the dashed Horizontal axis, Vertical axis and Breakdown buttons; the Data view picker is marked by callout 5
  2. In Search field names, type status. The field list narrows to the fields whose name contains the text.

  3. Drag the field attributes.status from the field list onto the dashed Horizontal axis button of the layer, which says "Add or drag-and-drop a field".

    Lens editor with the field list narrowed to the field attributes.status by the search box (callout 6); the field is dragged onto the dashed Horizontal axis button (callout 7)
  4. Click the new Horizontal axis entry to open its editor. Select the function Top values for the field attributes.status, so that each status becomes one bar. If the editor already shows Top values, keep it. Close the editor.

    Dimension editor of the Horizontal axis in Lens with the field attributes.status and the function list; Top values is marked by callout 8
  5. Drag the entry Records, above Available fields, onto the dashed Vertical axis button. Lens shows it as Count of records.

    Lens editor with attributes.status on the Horizontal axis; the entry Records of the field list is dragged onto the dashed Vertical axis button, marked by callout 9
  6. The workspace now draws a bar chart with one bar per status. Leave the chart type Bar with its subtype Stacked, and click Save and return.

    Lens editor with a bar chart of Count of records for each value of attributes.status, 200 and 404; the Save and return button of the second bar is marked by callout 10

Save the dashboard

  1. Back on the dashboard, which still is in edit mode and now shows the chart, click Save in the second bar.

    New Kibana dashboard in edit mode with the bar chart panel; the Save button of the second bar is marked by callout 11
  2. In the dialog Save as new dashboard, type Bookshelf (guides) in Title. The dialog also has Description, Tags and a Permissions section, which you leave alone.

  3. Turn on Store time with dashboard, so that the dashboard always opens with the time range it was saved with.

  4. Click Save.

    Save dashboard dialog of Kibana with the title Bookshelf (guides) marked by callout 12, the switch Store time with dashboard turned on and marked by callout 13, and the Save button marked by callout 14
  5. The breadcrumb now reads Editing Bookshelf (guides). Click Exit edit to return to view mode.

    Kibana dashboard Bookshelf (guides) still in edit mode after saving; the Exit edit button of the second bar is marked by callout 15

Check the result

Open Dashboards and then Bookshelf (guides). The dashboard must show one bar chart with a tall bar for 200 and a smaller one for 404, and it must open with the time range you saved it with (Last 15 minutes unless you changed it).

To see the chart react, force errors and press Refresh:

curl -X POST localhost:8090/mode/failing

Within about a minute a bar for the status 500 appears. Restore normal traffic afterwards:

curl -X POST localhost:8090/mode/normal

Variations

  • Replace Top values by a date histogram on @timestamp to see the same count over time instead of by status; the guide on time series charts in Lens does this step by step.

  • On a dashboard that already has panels, add the chart with Add → Visualization instead of the card of the empty state.

What can go wrong

Symptom Cause Fix

The workspace says that no results were found

The time picker covers Last 15 minutes and the load generator or the Bookshelf service is stopped, or the lab started a moment ago.

Widen the time picker to Last 1 hour, check the mode with curl localhost:8090/, and send curl -X POST localhost:8090/mode/normal if it is not normal.

The data view Bookshelf logs (guides) is not in the picker

The guide that creates it was skipped.

Do the data view guide first, then reopen the editor.

The chart shows a histogram of the status values instead of one bar per status

Lens chose Intervals for the numeric field.

Open the Horizontal axis editor and select Top values.

Save of the second bar is grey

Nothing changed on the dashboard since it was opened.

Add the panel first; the button turns blue when the dashboard has unsaved changes.

Clean up

Keep the dashboard: the following guides in this series extend it. To remove it with everything else the lab stores, stop the profile with docker compose --profile kibana down -v, which also deletes the volumes and therefore the dashboard.

Where to go next