Grafana Guide: Create a Dashboard and the First 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 Grafana 13.3.x.

What you build

You create a new dashboard called Bookshelf (guides) in the folder Guides and put one panel on it, a time series that draws how many requests per second the Bookshelf service answers, one line per HTTP status. The dashboard is the starting point of the later guides in this series, which add panels, variables, rows and alerts to it.

The finished dashboard Bookshelf (guides) in view mode: one panel, Requests per second by status, draws the request rate of the status codes 200 and 404 over the last 6 hours

Before you start

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

    cd lab
    docker compose --profile grafana up -d
  • Open http://localhost:3000, sign in as admin with the password admin, and click Skip when Grafana 13.3 asks you to update the default password.

  • Do the previous guide, Explore logs and traces, or at least the first-steps guide, which creates the folder Guides used in the Save the dashboard steps. If the folder does not exist, create it with Dashboards → New → New folder.

  • The data source Prometheus is provisioned by the lab and is the default data source, so there is nothing to add. The load generator sends traffic to the Bookshelf service in its default mode, which gives the query something to draw.

  • The guide was checked on Grafana Enterprise 13.3.0 (the free image, no licence key). Creating dashboards needs the Editor or Admin role of the organization; admin has it.

  • The figures are drawings of the Grafana 13.3 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 a dashboard in edit mode; the second shows the panel editor. Come back to them when a control is not where the figure shows it.

Map of the Grafana 13.3 dashboard in edit mode with seven numbered regions: breadcrumbs, the Add button, the time range picker, Save and Exit edit, the canvas of panels, the Add pane of the right sidebar and its icon strip
Map of the Grafana 13.3 panel editor with eight numbered regions: the Table view switch, the time controls, Save Discard and Back, the panel preview, the bottom tabs, the data source row, the query card and the visualization and options column

Open a new dashboard

  1. In the left navigation, click Dashboards.

  2. Click New at the top right, then New dashboard. The + button of the top bar offers the same entry.

    Dashboards page of Grafana 13.3 with the New menu open: callout 1 marks the Dashboards item of the navigation and callout 2 marks New dashboard in the menu

Add the first panel

  1. Look at the empty dashboard. Grafana 13.3 opens a new dashboard directly in edit mode and asks for a layout. Leave Auto grid selected, which is the default.

  2. In the Add pane of the right sidebar, click the Panel tile ("Drag or click to add a panel"). Earlier releases showed an Add visualization button in the middle of the page instead.

    New dashboard in edit mode: the empty state offers the layouts Auto grid and Custom grid, with Auto grid marked by callout 3, and the Add pane of the right sidebar has its Panel tile marked by callout 4
  3. In the Panel pane that replaces the Add pane, click Edit visualization.

    Dashboard in edit mode after the Panel tile was clicked: a panel called New panel with the buttons Configure visualization, Use saved query and Use library panel, and the Panel pane of the sidebar with Edit visualization marked by callout 5

Write the query

  1. At the bottom of the panel editor, check that the Queries tab is selected and that Data source shows Prometheus. If it shows another data source, open the picker and choose Prometheus.

  2. In query A, click Code in the Builder / Code switch.

    Panel editor of Grafana 13.3 with an empty New panel: callout 6 marks the Prometheus data source picker above the query and callout 7 marks the Code option of the Builder and Code switch
  3. Click inside the query editor first, so that it has the focus, then type the query:

    sum by (status) (rate(http_server_requests_seconds_count{application="bookshelf"}[1m]))
  4. Click Run queries.

    Panel editor in Code mode with the PromQL query for the request rate by status typed into the editor, marked by callout 8, and the Run queries button marked by callout 9

Choose the visualization and name the panel

  1. The preview now draws two lines, one for the status 200 and one for 404, and the right column lists suggested visualizations. Under Suggestions, click Time series.

    Panel editor after Run queries: the preview draws two lines for the status codes 200 and 404 and the Suggestions list on the right offers Time series first, marked by callout 10
  2. The right column becomes the options pane of the visualization, headed Time series. Under Panel options, type Requests per second by status in Title. The title of the preview changes as you type.

  3. In Description, type Request rate by status.

  4. Click Save in the header of the editor. The 13.3 panel editor has no Apply button; Save saves the whole dashboard and Back returns to it.

    Panel editor with the Time series options pane: the Title field holds Requests per second by status (callout 11), the Description field holds a short text (callout 12) and the Save button of the header is marked by callout 13

Save the dashboard

  1. In the Save dashboard drawer, replace the default Title New dashboard with Bookshelf (guides).

  2. In Folder, open the picker and choose Guides.

  3. Click Save.

    Save dashboard drawer of a new dashboard with the title Bookshelf (guides) marked by callout 14, the folder Guides marked by callout 15 and the Save button marked by callout 16
  4. A green toast reads Dashboard saved and the address bar changes to /d/<uid>/bookshelf-guides. You stay in the panel editor, which now also has an Alert tab. Click Back.

    Panel editor right after saving: a green toast reads Dashboard saved, the bottom tabs now include Alert, and the Back button of the header is marked by callout 17

Leave edit mode

  1. The dashboard is still in edit mode and shows the panel. Click Exit edit.

    Dashboard Bookshelf (guides) in edit mode with the panel Requests per second by status, and the Exit edit button of the toolbar marked by callout 18
  2. If Grafana 13.3.0 shows the dialog Unsaved changes ("Do you want to save your changes?"), which it did even right after a save, click Save.

    Unsaved changes dialog asking Do you want to save your changes, with the buttons Cancel, Discard and Save; the Save button is marked by callout 19
  3. In the Save dashboard drawer that opens, click Save again. Edit mode closes and the dashboard is shown as in the figure at the top of this guide.

    Save dashboard drawer of the existing dashboard with the Message field and one change listed; the Save button is marked by callout 20

Check the result

Open Dashboards → Guides → Bookshelf (guides). The dashboard must show one panel, Requests per second by status, with a green line for 200 and a yellow line for 404 over the last 6 hours, and the toolbar must offer Edit.

To see the query react, force errors and reload the panel with Refresh:

curl -X POST localhost:8090/mode/failing

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

curl -X POST localhost:8090/mode/normal

Variations

  • Build the same panel without typing PromQL: in the query editor stay on Builder, choose the metric http_server_requests_seconds_count, add the label filter application = bookshelf, then add the operations Rate with Range 1m and Sum by with Label status.

  • Start from Explore instead of a dashboard: run the same query there and use Add → Add to dashboard, as the guide on exploring metrics shows.

What can go wrong

Symptom Cause Fix

The preview says No data and the editor shows a red error row

The text was typed before the editor had the focus, so the query is mangled (Prometheus reports a parse error).

Click in the editor, select all with Ctrl+A (Cmd+A on macOS), and type the query again.

Only the line for 200 is drawn, or the chart is empty

The lab started less than a minute ago, so Prometheus has few samples, or the load generator is stopped.

Wait a minute and press Refresh. Check the mode with curl localhost:8090/ and send curl -X POST localhost:8090/mode/normal if it is not normal.

The folder picker does not list Guides

The first-steps guide was skipped.

Cancel the drawer, create the folder with Dashboards → New → New folder, and save again.

Exit edit keeps showing Unsaved changes

Grafana 13.3.0 raises the dialog even after a save.

Click Save, and Save again in the drawer; the dialog does not return once edit mode has closed.

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 grafana down -v, which also deletes the volumes and therefore the dashboard.

Where to go next