segunda-feira, 11 de junho de 2018

Installing ELK Stack - Elasticsearch Logstash and Kibana on a Minimal Ubuntu System

This post opens a series about the ELK stack, having a minimal Ubuntu as a base OS.

Ubuntu image can be obtained here https://help.ubuntu.com/community/Installation/MinimalCD

You will want at least 2GB of RAM memory in your machine, although the minimal recomendation is 1GB. When selecting packages, OpenSSH server, depending on your setup, might be the only dependency.

Some packages that might be of use:

apt-get install vim net-tools python-pip

These are required for the installation:

apt-get install gnupg apt-transport-https

Install java 8

apt-get install openjdk-8-jdk

Configure sources

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list

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

In the file /etc/kibana/kibana.yml update the server.host parameter to the one used in your environment:

server.host: “192.168.1.5”

And finally, to make Elasticsearch and Kibana start automatically at boot:

systemctl enable elasticsearch.service
systemctl enable kibana.service


You will end up with 4GB used in your hard drive, and a functional ELK stack server.