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:

Table of Content

  1. Ensure the server is up to date
  2. Import the Elastic gpg key
  3. Install Kibana from the RPM Repo
  4. Starting and enabling Kibana service
  5. Enable the service in firewall
  6. Configuring Kibana
  7. Accessing Kibana

1. 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:

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:

sudo apt install -y vim wget

2. 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:

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

Download and install the public signing key:

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

3. Install Elasticsearch from the APT repository

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

sudo apt-get install apt-transport-https

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

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:

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

Confirm the installation

$ apt-cache policy kibana
kibana:
  Installed: 8.6.0
  Candidate: 8.6.0

4. Start and enable Kibana service

Use this command to start Kibana service on the system.

sudo systemctl start kibana

Confirm the service status using this command:

$ 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:

sudo systemctl enable kibana

5. Enable the service in firewall

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

sudo ufw allow 5601/tcp

6. 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:

ss -tulpn | grep 5601

This is my output:

$ ss -tulpn | grep 5601
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:

server.host: "0.0.0.0"

To connect to an Elasticsearch instance, use this:

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

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

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:

sudo systemctl restart kibana

7. Accessing Kibana dashboard

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

comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy