What is the ELK stack ? and how to install it ?

  • Elasticsearch
  • Logstash
  • Kibana

What’s Elasticsearch ?

Elasticsearch is a nosql engine. The structure of this database type is the document. One document can store many fields. For example, in ecommerce, you can have a document for a product or a customer.

What’s Logstash ?

Logstash is an extract, transform and load software. So with it, you can collect data with many inputs (filebeat, postgresql, kafka, files, http). After the collect Logstash helps you to transform the data if necessary. For example, you can split your data or you can add the ip geolocalisation…

What’s kibana ?

Kibana is the graphical user interface for elasticsearch (not for logstash). With kibana you can manage your elasticsearch cluster (only some tasks not all). You configure your cluster with kibana instead of the command line and yaml files. But Kibana helps you to analyse your datas with many visualization tools. For example you can create charts and dashboards. But you can also create maps or just query all documents in the elasticsearch cluster.

How to install the ELK stack ?

In our example, we install ELK on a debian server. But you could do the same logic for a redhat server.

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update
sudo vim /etc/elasticsearch/jvm.options
sudo systemctl restart elasticsearch.service
sudo systemctl enable elasticsearch.service
sudo apt-get install logstash
sudo systemctl start logstash.service
sudo systemctl enable logstash.service
sudo apt-get install kibana
sudo systemctl status kibana.service
sudo vim /etc/kibana/kibana.yml
# change server.host to "" or "external ip"
sudo systemctl start kibana.service
sudo systemctl enable kibana.service



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Xavier Pestel (Xavki)

Xavier Pestel (Xavki)

Microservices architecture and opensource. I’m maintainer of xavki https://youtube.com/c/xavki-linux about opensource. My blog : https://xavki.blog/