In this guide, we will learn how to install and configure Kibana on Ubuntu 22.04.
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.
- How to Install and Configure Elasticsearch 8 on Ubuntu 22.04
- How to Install and Configure Elasticsearch on Rocky Linux 8
- How to Install and Configure Kibana on Rocky Linux/Alma Linux 8
- How to Install and Configure Kibana on OpenSUSE Leap 15.3
Table of Content
- Ensure the server is up to date
- Import the Elastic gpg key
- Install Kibana from the RPM Repo
- Starting and enabling Kibana service
- Enable the service in firewall
- Configuring Kibana
- 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
Save the repository definition to
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.2.3 Candidate: 8.2.3 Version table: *** 8.2.3 500 500 https://artifacts.elastic.co/packages/8.x/apt stable/main amd64 Packages 100 /var/lib/dpkg/status 8.2.2 500
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 Fri 2022-06-17 06:57:01 UTC; 6s ago Docs: https://www.elastic.co Main PID: 3262 (node) Tasks: 11 (limit: 4623) Memory: 142.8M CPU: 4.599s CGroup: /system.slice/kibana.service └─3262 /usr/share/kibana/bin/../node/bin/node /usr/share/kibana/bin/../src/cli/dist Jun 17 06:57:01 kip-ubuntu2204srv.citizix.com systemd: Started Kibana.
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:
To connect to an Elasticsearch instance, use this:
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 8 on Ubuntu 22.04.
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.