How to Install and Configure Kibana on Debian 11

Kibana is a proprietary data visualization dashboard software for Elasticsearch, whose open source successor in OpenSearch is OpenSearch Dashboards. It is a data visualization and exploration tool used for log and time-series analytics, application monitoring, and operational intelligence use cases. It offers powerful and easy-to-use features such as histograms, line graphs, pie charts, heat maps, and built-in geospatial support. Kibana also acts as the user interface for monitoring, managing, and securing an Elastic Stack cluster - as well as the centralized hub for built-in solutions developed on the Elastic Stack.

In this guide, we will learn how to install and configure Kibana on Debian 11.

Related Content:

Ensuring that the server is up to date

Before proceeding, let us ensure that our server is up to date and all the packages are the latest version. Use these commands to achieve this:

1
2
sudo apt update
sudo apt upgrade -y

If there are packages to upgrade, the above command may take a couple of minutes.

Let us also install some common packages that we will need later:

1
sudo apt install -y vim wget

Import the Elasticsearch PGP Key

Elasticsearch signs all of our packages with the Elasticsearch Signing Key (PGP key D88E42B4, available from https://pgp.mit.edu) with fingerprint:

1
4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4

Download and install the public signing key:

1
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg

Install Elasticsearch from the APT repository

You may need to install the apt-transport-https package on Debian before proceeding:

1
sudo apt-get install apt-transport-https

Save the repository definition to /etc/apt/sources.list.d/elastic-8.x.list:

1
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list

You can then install the Elasticsearch package with:

1
sudo apt-get update && sudo apt-get install kibana

Confirm the installation

1
2
3
4
$ apt-cache policy kibana
kibana:
  Installed: 8.6.0
  Candidate: 8.6.0

Start and enable Kibana service

Use this command to start Kibana service on the system.

1
sudo systemctl start kibana

Confirm the service status using this command:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$ sudo systemctl status kibana

● kibana.service - Kibana
     Loaded: loaded (/lib/systemd/system/kibana.service; disabled; vendor preset: enabled)
     Active: active (running) since Sun 2023-01-22 09:50:57 UTC; 18s ago
       Docs: https://www.elastic.co
   Main PID: 2382087 (node)
      Tasks: 11 (limit: 8920)
     Memory: 308.9M
        CPU: 14.926s
     CGroup: /system.slice/kibana.service
             └─2382087 /usr/share/kibana/bin/../node/bin/node /usr/share/kibana/bin/../src/cli/dist

Jan 22 09:51:10 fidle-debiansrv kibana[2382087]: [2023-01-22T09:51:10.175+00:00][INFO ][plugins-service] Plugin "cloudExperiments" is>
Jan 22 09:51:10 fidle-debiansrv kibana[2382087]: [2023-01-22T09:51:10.175+00:00][INFO ][plugins-service] Plugin "cloudFullStory" is d>
Jan 22 09:51:10 fidle-debiansrv kibana[2382087]: [2023-01-22T09:51:10.175+00:00][INFO ][plugins-service] Plugin "cloudGainsight" is d>
Jan 22 09:51:10 fidle-debiansrv kibana[2382087]: [2023-01-22T09:51:10.201+00:00][INFO ][plugins-service] Plugin "profiling" is disabl>
Jan 22 09:51:10 fidle-debiansrv kibana[2382087]: [2023-01-22T09:51:10.271+00:00][INFO ][http.server.Preboot] http server running at h>
Jan 22 09:51:10 fidle-debiansrv kibana[2382087]: [2023-01-22T09:51:10.358+00:00][INFO ][plugins-system.preboot] Setting up [1] plugin>
Jan 22 09:51:10 fidle-debiansrv kibana[2382087]: [2023-01-22T09:51:10.361+00:00][INFO ][preboot] "interactiveSetup" plugin is holding>
Jan 22 09:51:10 fidle-debiansrv kibana[2382087]: [2023-01-22T09:51:10.402+00:00][INFO ][root] Holding setup until preboot stage is co>
Jan 22 09:51:10 fidle-debiansrv kibana[2382087]: i Kibana has not been configured.
Jan 22 09:51:10 fidle-debiansrv kibana[2382087]: Go to http://localhost:5601/?code=717676 to get started

The above output shows that the service is up and running. Enable the service using this command:

1
sudo systemctl enable kibana

Enable the service in firewall

If you have firewall installed and enabled, you need to allow the service. Use these commands to achieve that:

1
sudo ufw allow 5601/tcp

Configuring Kibana

Kibana configuration file can be found in this path /etc/kibana/kibana.yml. Kibana will run as a http service exposing port 5601. It is bound to localhost by default. Confirm this using this command:

1
ss -tulpn | grep 5601

This is my output:

1
tcp   LISTEN 0      511             127.0.0.1:5601         0.0.0.0:*

To bind the service to all ports so the service can be accessed remotely, addd this line to the file:

1
server.host: "0.0.0.0"

To connect to an Elasticsearch instance, use this:

1
elasticsearch.hosts: ["http://localhost:9200"]

If you have configured a password for your elasticsearch, configure with this:

1
2
elasticsearch.username: "kibana_system"
elasticsearch.password: "pass"

If you do not have Elasticsearch installed, please check out this guide How to Install and Configure Elasticsearch on Debian 11.

To apply the changes, you need to restart the kibana service:

1
sudo systemctl restart kibana

Accessing Kibana dashboard

Access the Kibana dashboard on your web browser at http://server-IP:5601. You can now configure your graphs and metrics.

Last updated on Oct 14, 2024 11:46 +0300
comments powered by Disqus
Citizix Ltd
Built with Hugo
Theme Stack designed by Jimmy