# Kibana dashboard tutorial for beginners

The search and analytics engine [Elasticsearch](https://www.ionos.ca/digitalguide/server/configuration/elasticsearch/) is one of the best open source solutions for **indexing and structuring large databases**. However, it’s possible to gain valuable insights in later analysis of raw data if it’s visualized **in a clear and easily understandable form**. The visualization tool, Kibana, has been developed especially for presenting Elasticsearch data and will be discussed in this **tutorial**.

## What is Kibana?

**Kibana** is an extensible web interface for visually representing collected data. Together with **Elasticsearch** and the data processing tool **Logstash**, it forms the so-called **ELK stack** (also called Elastic Stack). This open-source suite enables users to collect data from different **server sources** (and in any format), arrange it, and prepare it for analytical purposes. In addition to the ability to visualize the data processed by Logstash and Elasticsearch, Kibana also offers **automatic real-time analysis**, a very **flexible search algorithm**, and **different data view types** (histograms, graphs, pie charts, etc.). In the dashboard, the individual interactive visualizations can then be combined to form a dynamic overall picture that can be filtered and searched.

As a web-based application written in **JavaScript**, Kibana can be used **across platforms**. Costs only arise if you use the hosting service, Elastic Cloud, offered by the developer. This paid service allows you to **implement and organize a secure Elasticsearch Kibana cluster on Amazon or Google** without having to provide your own resources.

## Kibana tutorial: First steps with the visualization tool

Kibana offers a huge range of functions that can be used to display prepared database stocks. However, before you can filter and visualize the information in the dashboard so that the desired **key values** can easily be viewed, analyzed, and evaluated in the long term, you have a good bit of work ahead of you. With this Kibana tutorial we want to make it easier for you to get started with the powerful web interface. This article explains how to install Kibana correctly, how to create your own dashboard, and how to integrate existing data into Elastic’s visualization tool.

### Step 1: How to get Kibana up and running

Since Kibana is designed to display data that has been indexed using **Elasticsearch**, you will first need to install the search and analytics engine. The corresponding **packages for Windows, macOS, and Linux** can be found in the [Elasticsearch download center](https://www.elastic.co/downloads/elasticsearch "Download from Elasticsearch"). The prerequisite is that you have a current Java runtime environment (64-bit) installed.

Kibana itself is also available as cross-platform software for **Windows, macOS**, and **Linux** (RPM, DEB). Since the application is based on the JavaScript runtime environment [Node.js](https://www.ionos.ca/digitalguide/websites/web-development/introduction-to-nodejs/), the various installation packages also contain the necessary Node.js binaries used to run the visualization tool – separately maintained versions are not supported. The different packages (ZIP compressed) can be found like Elasticsearch on the **[Elastic website](https://www.elastic.co/kibana "Kibana download")**.

---

### Note

Linux and Mac users can also install Kibana **from the Elastic repository** using the **apt** and **yum** package managers. Detailed instructions can be found in the [online manuals](https://www.elastic.co/guide/en/kibana/current/install.html "Kibana-Online-Docs: Installation").

---

Once you have unpacked the Kibana package, run the **bin/kibana** (macOS, Linux) or bin\\kibana.bat (Windows) file to get the Kibana server up and running.

[![Image: Windows 10 command line: Kibana server initialization](https://www.ionos.ca/digitalguide/fileadmin/_processed_/4/0/csm_Kibana-Tutorial_74027b8dd3.webp "Windows 10 command line: Kibana server initialization")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial.jpg) Initializing the Kibana server takes a few seconds.       You then access the Kibana backend via the address "**http://localhost:5601**" in your browser (Elasticsearch must already be running for this to work).

[![Image: Kibana: home screen](https://www.ionos.ca/digitalguide/fileadmin/_processed_/0/5/csm_Kibana-Tutorial2_c83ac43b8d.webp "Kibana: home screen")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial2.jpg) The Kibana user interface.       ###  Step 2: Feed Kibana with data

To be able to take a closer look at the Kibana dashboard and its functions in this tutorial, the application must first be supplied with data. On the [Elastic website](https://www.elastic.co/guide/en/kibana/current/index.html "elastic.co: Loading sample data"), there are three free downloadable database samples, which we use here for testing purposes. The three databases listed above are "**shakespeare.json**" (database of the complete works of William Shakespeare), "**accounts.zip**" (set of fictitious accounts), and "**logs.jsonl.gz**" (set of randomly generated log files).

Download and unzip the three files (account and log file) and save them to the location of your choice.

[![Image: Database samples for Kibana on elastic.co](https://www.ionos.ca/digitalguide/fileadmin/_processed_/1/2/csm_Kibana-Tutorial3_0d84636d6a.webp "Database samples for Kibana on elastic.co")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial3.jpg) To download the sample databases, you can also simply click on the respective links – the download will then start automatically.       Before you submit the data, it is necessary to create **mappings** for the Shakespeare and server log database fields. These mappings **divide the documents in the index into logical groups** and also specify the properties of the fields, such as their searchability. The appropriate tool for configuring the mappings is the console, which can be found in the Kibana interface under the menu items "Dev Tools" à "Console."

[![Image: Kibana: Console plugin](https://www.ionos.ca/digitalguide/fileadmin/_processed_/a/4/csm_Kibana-Tutorial4_515ef7148b.webp "Kibana: Console plugin")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial4.jpg) The Kibana console plugin provides an interface that allows you to interact directly with Elasticsearch’s REST API.       Now insert the following mappings in sequence via PUT request:

```none
PUT /shakespeare
{
 "mappings": {
  "doc": {
   "properties": {
    "speaker": {"type": "keyword"},
    "play_name": {"type": "keyword"},
    "line_id": {"type": "integer"},
    "speech_number": {"type": "integer"}
   }
  }
 }
}
```

```none
PUT /logstash-2015.05.18
{
    "mappings": {
        "log": {
            "properties": {
                "geo": {
                    "properties": {
                        "coordinates": {
                            "type": "geo_point"
                        }
                    }
                }
            }
        }
    }
}
```

```none
PUT /logstash-2015.05.19
{
    "mappings": {
        "log": {
            "properties": {
                "geo": {
                    "properties": {
                        "coordinates": {
                            "type": "geo_point"
                        }
                    }
                }
            }
        }
    }
}
```

```none
PUT /logstash-2015.05.20
{
    "mappings": {
        "log": {
            "properties": {
                "geo": {
                    "properties": {
                        "coordinates": {
                            "type": "geo_point"
                        }
                    }
                }
            }
        }
    }
}
```

[![Image: Kibana console: inputting database mappings](https://www.ionos.ca/digitalguide/fileadmin/_processed_/4/d/csm_Kibana-Tutorial5_f2135733ee.webp "Kibana console: inputting database mappings")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial5.jpg) By clicking on the green triangle symbol, you can display the answer to the request entered in the Kibana console.     Now use the bulk API of Elasticsearch to load the data records via curl in the terminal. In Windows, use the PowerShell with Invoke-RestMethod instead (code example below):

```none
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/shakespeare/doc/_bulk?pretty' --data-binary @shakespeare_6.0.json
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/_bulk?pretty' --data-binary @logs.jsonl
```

```none
Invoke-RestMethod "http://localhost:9200/bank/account/_bulk?pretty" -Method Post -ContentType 'application/x-ndjson' -InFile "accounts.json"
Invoke-RestMethod "http://localhost:9200/shakespeare/doc/_bulk?pretty" -Method Post -ContentType 'application/x-ndjson' -InFile "shakespeare_6.0.json"
Invoke-RestMethod "http://localhost:9200/_bulk?pretty" -Method Post -ContentType 'application/x-ndjson' -InFile "logs.jsonl"
```

[![Image: Windows Powershell, which displays the loading of the Kibana data set](https://www.ionos.ca/digitalguide/fileadmin/_processed_/4/8/csm_Kibana-Tutorial6_4039cbf5f9.webp "Windows Powershell, which displays the loading of the Kibana data set")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial6.jpg) Make sure that you execute the commands for loading the Kibana data sets in the directory where the three sample databases are located.       ---

### Note

Depending on the computing power, inputting the data sets can take several minutes.

---

Switch back to the Kibana console to **verify the success of the loading process with the following GET request**:

```none
GET /_cat/indices?v
```

If the data is integrated as planned, the **output** looks like this:

[![Image: Kibana console: output of the index request](https://www.ionos.ca/digitalguide/fileadmin/_processed_/a/7/csm_Kibana-Tutorial7_17f1023bcc.webp "Kibana console: output of the index request")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial7.jpg) The health status "yellow" indicates that Elasticsearch has assigned all primary shards (parts of a data index), but not all replicas (back-ups of the shards).       ###  Step 3: Defining a first index pattern

In order for Kibana to know which data it should process, you must create corresponding **patterns for the indices "Shakespeare," "bank," and "logstash."** You can define the former as follows:

1. Open the menu "**Management**" and click on "**Index Patterns.**" When you create the first index pattern, the "**Create index pattern**" page will open automatically. Alternatively, you can access it using the button with this written on it.
2. Enter "**shakes\***" into the field "**Index pattern**" and click on "**Next step.**"
3. Since no special configuration is required for this pattern, skip the next setup step and complete the pattern creation directly by clicking "**Create index pattern.**"

[![Image: Kibana interface: menu for creating the index pattern](https://www.ionos.ca/digitalguide/fileadmin/_processed_/0/a/csm_Kibana-Tutorial8_34350f67c1.webp "Kibana interface: menu for creating the index pattern")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial8.jpg) A newly created index pattern must match at least one index that contains existing data. Otherwise, you cannot continue the setup process.       Repeat the steps for the pattern "**ba\***" which is automatically assigned to the index "bank."

Finally, define an index pattern called "**logstash\***" for the three server log indexes. With this pattern, however, you do not skip the configuration menu, but select the entry "**@timestamp**" in the dropdown menu "Time Filter field name," as these records contain time series data. Then click on "**Create index pattern**" as for the two previous patterns.

[![Image: Kibana: time filter configuration menu for the logstash* pattern](https://www.ionos.ca/digitalguide/fileadmin/_processed_/5/2/csm_Kibana-Tutorial9_5ee3837d6d.webp "Kibana: time filter configuration menu for the logstash* pattern")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial9.jpg) Time series data, such as server logs, are data records with data that is or has been continuously recorded.       ###  Step 4: Browse inserted datasets

After you feed your Kibana server with records, you can now **start an Elasticsearch search query** to search these records and filter the results. To do this, go to the “**Discover**” menu in Kibana and select the index pattern for your search using the small triangle icon in the left menu bar. As part of this Kibana dashboard tutorial, we have chosen the account record (ba\*):

[![Image: Kibana: list of the entries of a fictitious data set](https://www.ionos.ca/digitalguide/fileadmin/_processed_/9/c/csm_Kibana-Tutorial10_bd40dbc909.webp "Kibana: list of the entries of a fictitious data set")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial10.jpg) Kibana lists the individual entries of the selected record, with the ba\* record containing typical bank account categories such as balance, name, age, etc.       As a test, you can filter the bank account record to see only accounts that **meet certain criteria**. For example, to specifically search for accounts that have a **balance of over $47,500** and belong to people **over 38 years of age**, type the following command in the search box:

```none
balance:>47500 AND age:>38
```

Discover then returns the entries for the **four accounts 97, 177, 878, and 916** that correspond to the selected criteria.

[![Image: Kibana: results of data set filtering](https://www.ionos.ca/digitalguide/fileadmin/_processed_/0/d/csm_Kibana-Tutorial11_5e7711a2de.webp "Kibana: results of data set filtering")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial11.jpg) With the button "Add a filter" you can easily define your own filters for the selected database.       With the button "Add a filter" you can easily define your own filters for the selected database.

### Step 5: Visualize data

With the preparations made so far in this Kibana tutorial, you are now able to visualize the implemented data to bring your dashboard to life. Here is where an example of a **pie chart for the bank account database** is created. On the one hand, this diagram should show which proportion of the total of 1,000 accounts falls into certain bank account balance ranges, and on the other hand, how the age-specific distribution within these divisions turns out.

In the first step, open the "**Visualize**" menu and click on "**Create a visualization**" to get a list of the available visualization types. Then select the "**Pie**" option.

[![Image: Kibana: selection menu for the visualization types](https://www.ionos.ca/digitalguide/fileadmin/_processed_/5/8/csm_Kibana-Tutorial12_b7633a438b.webp "Kibana: selection menu for the visualization types")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial12.jpg) The visualization types available in Kibana include heat maps, bar charts, and area charts.       At the beginning, you will only see a simple circle that summarizes all entries of the database, since **no categories have been defined** yet. These are also called "**buckets**" in Kibana and can be created under the menu item of the same name.

To first define the individual account balance divisions, click on "**Split Slices**" and select "**Range**" from the "**Aggregation**" drop-down menu:

[![Image: Kibana: definition window for diagram categories](https://www.ionos.ca/digitalguide/fileadmin/_processed_/b/0/csm_Kibana-Tutorial13_f06b972d7a.webp "Kibana: definition window for diagram categories")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial13.jpg) You can use the "Range" type to create individual value ranges for selected fields of a data record.       Under "**Field**" search for the entry "**balance**" and click on it, then click on the "**Add Range**" button four times to define the following six bank account balance categories:

<table>
  <tbody>
    <tr>
      <td>0</td>
      <td>999</td>
    </tr>
    <tr>
      <td>1000</td>
      <td>2999</td>
    </tr>
    <tr>
      <td>3000</td>
      <td>6999</td>
    </tr>
    <tr>
      <td>7000</td>
      <td>14999</td>
    </tr>
    <tr>
      <td>15000</td>
      <td>30999</td>
    </tr>
    <tr>
      <td>31000</td>
      <td>50000</td>
    </tr>
  </tbody>
</table>

Then click “**Apply Changes**” (triangle symbol), and the pie chart will show the distribution of accounts according to the defined account balance divisions.

[![Image: Kibana: pie chart with defined categories](https://www.ionos.ca/digitalguide/fileadmin/_processed_/4/3/csm_Kibana-Tutorial14_54bbcb8aff.webp "Kibana: pie chart with defined categories")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial14.jpg) Kibana automatically creates a legend to the created diagram, whose position (right, left, top, bottom) can be adjusted in the options.       In the second step, you add another ring to the diagram that visualizes the distribution of age classes for the individual account balance areas. To do this, click on "**Add sub-buckets,**" then on "**Split Slices**" again and select "**Terms**" from the drop-down menu. Search under "**Field**" for the entry "**age**" and accept the changes via "**Apply changes.**"

[![Image: Kibana: pie chart with defined categories and subcategories](https://www.ionos.ca/digitalguide/fileadmin/_processed_/2/2/csm_Kibana-Tutorial15_866868c96d.webp "Kibana: pie chart with defined categories and subcategories")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial15.jpg) If you move the mouse over the individual components of a diagram, Kibana will show you further tool tips unless you have deactivated this in the options.       You can now save the visualization very easily using the "Save" button located in the upper menu bar.

### Step 6: Organizing the dashboard

The Kibana Dashboard is covered briefly in this tutorial, so you'll **create your first test dashboard** using the search and visualization you saved in steps 4 and 5. To do this, select the dashboard in the page navigation and then click "**Create new dashboard**" and then "**Add.**" Kibana will now automatically list all saved visualizations or Elasticsearch searches:

[![Image: Kibana dashboard: menu for adding new panels](https://www.ionos.ca/digitalguide/fileadmin/_processed_/a/b/csm_Kibana-Tutorial16_c4b245f0fc.webp "Kibana dashboard: menu for adding new panels")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial16.jpg) The search function makes it easy to find the desired dashboard components, even with a large number of visualizations or Elasticsearch search results.       Left-click to add the account balance visualization and the sample search result to the dashboard, whereupon you can view both in separate panels in the dashboard:

[![Image: Kibana dashboard: tutorial test example](https://www.ionos.ca/digitalguide/fileadmin/_processed_/9/e/csm_Kibana-Tutorial17_2471812671.webp "Kibana dashboard: tutorial test example")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2018/Kibana-Tutorial17.jpg) The "Share" button allows you to share your Kibana dashboard with other users or integrate it into your website at any time.       You can now modify the panels, for example by **resizing them** or **changing their position**. It is also possible to display a visualization or search result on the entire screen, or **delete it from the dashboard**. With many visualizations, you can also use “Inspect” to display additional information about the underlying data and queries.

---

### Note

If you remove a panel from the Kibana dashboard, the saved visualization or search will be preserved.

---


This is a markdown version of: [https://www.ionos.ca/digitalguide/online-marketing/web-analytics/kibana-tutorial/](https://www.ionos.ca/digitalguide/online-marketing/web-analytics/kibana-tutorial/) for AI/LLM consumption.