MiniELK is a docker-compose project for running the ELK-Stack in an easy way. MiniELK is based on the Elastic-Stack and uses an Elastic Trial-License for 30 Days. To keep it simple this project contains only the ELK Stack which should help you to get up an running with Elasticsearch, Logstash, Kibana on your local sytem.
Here’s why you should get started with MiniELK on your local machine:
𝟭. 𝗤𝘂𝗶𝗰𝗸 𝗦𝗲𝘁𝘂𝗽 𝘄𝗶𝘁𝗵 𝗗𝗼𝗰𝗸𝗲𝗿: Spin up your environment in minutes, thanks to Docker-Compose.
𝟮. 𝗜𝘀𝗼𝗹𝗮𝘁𝗲𝗱: Play around with Elasticsearch, Kibana, and Logstash right on your local (isoloated) setup.
𝟯. 𝗡𝗼-𝗗𝗲𝗽𝗲𝗻𝗱𝗲𝗻𝗰𝗶𝗲𝘀: Customize your environment to suit your unique needs without any cloud dependencies.
𝟰. 𝗖𝗼𝘀𝘁-𝗘𝗳𝗳𝗶𝗰𝗶𝗲𝗻𝘁: No need for expensive cloud resources. Utilize your local hardware to its fullest potential.
𝟱. 𝗡𝗲𝘄-𝗙𝗲𝗮𝘁𝘂𝗿𝗲𝘀: Perfect for learning and testing new features.
Get hands-on with MiniELK today and take a look at the lastest features!
Please give the project a GitHub Star if you like it. Thank your very much in advance!
What's new in Elastic 8.18.x? https://www.elastic.co/blog/elastic-stack-8-18-1-released
Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
Logstash: https://www.elastic.co/guide/en/logstash/current/index.html
Kibana: https://www.elastic.co/guide/en/kibana/current/index.html
Getting started with the Elastic Stack and Docker Compose: Part 1
Getting started with the Elastic Stack and Docker Compose: Part 2
MiniELK is tested on Windows 11, Docker Desktop and Windows Subsystem for Linux (WSL2)
Name | Reference |
---|---|
Windows | >= 11 |
Docker Desktop | >= 4.12.0 |
WSL | >= 2 |
Ubuntu | >= 20.04.6 LTS (Focal Fossa) |
docker | https://docs.docker.com/engine/reference/run/ |
docker-compose | https://docs.docker.com/compose/reference/overview/ |
Before you can run the ELK-Stack with WSL2 you have to change the '.wslconfig' file.
-
Create .wslconfig file under your Windows user profile directoy
C:\Users\<YourUsername>\.wslconfig
-
Add the following lines to '.wslconfig'
[wsl2] kernelCommandLine = "sysctl.vm.max_map_count=262154"
-
Shutdown Ubuntu from PowerShell
windows~$> wsl.exe --shutdown
-
Start Ubuntu again from PowerShell
windows~$> start ubuntu
NOTE: More information here https://learn.microsoft.com/en-us/windows/wsl/
Basis Setup of Ubuntu under wsl2 https://youtu.be/X3bPWl9Z2D0
-
In Ubuntu clone the MiniELK repo
ubuntu~$> cd $HOME ubuntu~$> git clone https://github.com/schneidermatic/MiniELK.git
-
Setup your environment
ubuntu~$> cd MiniELK/stack ubuntu~$> source ./.xrc ubuntu~$> x_setup
NOTE: x_setup modifies Linux Kernel parameters.
-
Rebooting Ubuntu from PowerShell in Windows
windows~$> wsl --list windows~$> wsl --shutdown "Ubuntu (Default)" windows~$> start ubuntu
-
After the rebooting of Ubuntu go into the stack folder and run ...
ubuntu~$> cd $HOME/MiniELK/stack ubuntu~$> docker-compose up -d
-
Get your IP-Address with ifconfig (only if localhost doesn't work)
ubuntu~$> ifconfig
-
Use Kibana in your Browser for further actions
https://localhost:5601
user: elastic
password: changeme -
Create your first Data
Select on the left side 'Discover'
-
Create a data View
-
Define the Index Pattern
-
Heartbeat Log Data View
NOTE: In the Logstash file './stack/resources/ls01/pipeline/event.pipeline' there is an heartbeat input defined
that sends events to elasticsearch in an interval of 5 sec.
-
Stop the docker containers
ubuntu~$> docker-compose stop
-
Start the docker containers
ubuntu~$> docker-compose start
-
Remove the docker containers
ubuntu~$> docker-compose down -v
NOTE: when you run 'docker-compose down -v' you'll loose all your data too!!!
If you find some bugs or have any requests/suggestions don't hesitate to open an issue or make a pull request.