Install Elasticsearch Kibana and Logstash with Docker

  Рет қаралды 28,509

Ali Younes

Ali Younes

Күн бұрын

#elasticsearch #filebeat #kibana #elasticsearchtutorial #logstash #metricbeat #docker #dockercompose #dockercontainer
In this video, we install Elasticsearch, Kibana, and Logstash using Docker Compose. This is a way to bring up a cluster for quick testing and development.
You can get the files from my GitHub ink:
github.com/ayo...
Watch how to install Elasticsearch and Kibana:
• Installing and Configu...
Thank you for watching!
Follow my Twitter: / ayounes9
Follow my LinkedIn: / aliyounes9

Пікірлер: 42
@dv7045
@dv7045 6 ай бұрын
Hi, it seems that the main Docker Compose code was borrowed from the elkninja repository, as described in an Elasticsearch blog post. However, there is a significant drawback to this implementation: the generated certificates lack passwords, and no keystores are configured. The author of the blog post mentioned that this setup is suitable for Proof of Concept (POC) purposes, but not for production environments.
@mathas604
@mathas604 Жыл бұрын
Thank you for the video. Really appreciate it. Maybe you can add more hands on in ingesting filebeat (including logstash filtering) and metricbeat to monitor firewall metricbeat in kibana
@alkhateeeb
@alkhateeeb Ай бұрын
Thank you, Ali, for this video, useful one.
@jonmarkortiz
@jonmarkortiz 5 ай бұрын
Thanks so much for this very simple and well narrated tutorial. I am curious what your approach would be. I currently have my docker-compose file that has the following services - frontend, backend, mongo, and redis. My frontend and backend are referencing builds that point to Dockerfiles that exist in the roots of each directories. The mongo and redis are not and instead referencing the images along with additional meta info. My question is this - wanting to keep my docker-compose file more readable and not make it too enormous, is there a strategy on how to introduce the services for elasticsearch, kibana, and some number of es nodes - es01, es02 etc? In regard to the docker-compose implementation which elastic gives us, is it possible to create an elasticsearch directory, with a Dockerfile that abstracts out more of the docker-compose implementation? Are there examples out there you know of and maybe some key pages in Docker to reference regarding this? Thanks again for all your help. Btw, I am happy to send you a link to my existing repo containing my yml, if it helps you see more clearly. Thanks again.
@schoonees
@schoonees Ай бұрын
Hi Ali, fantastic video - works like a charm. Thx for the effort. I have one or two questions regarding adding additional containers to the docker-compose file. If i add additional containers, i get the following error, validating /home/test/elk/docker-compose.yml: services.logstash Additional property filebeat is not allowed. Can file beat just be added as a separate container instead of adding it to the docker-compose file?
@AliYounesGo4IT
@AliYounesGo4IT Ай бұрын
You can add it as a separate container, but I think the error is because Filebeat has to be on the same level as Logstash under the "services" key in the docker-compose.yml file.
@agilebarsfromtimebarsltd.4918
@agilebarsfromtimebarsltd.4918 11 ай бұрын
Totally awesome, thank you very much.
@edinsonguzman179
@edinsonguzman179 9 ай бұрын
I run the docker-compose up -d and always fail to start the container elk-es01-1, How to troobleshoot this problem?
@edinsonguzman179
@edinsonguzman179 9 ай бұрын
I run this locally in Mac
@luquinhas-mg
@luquinhas-mg 8 ай бұрын
me too,but i run rhel 9
@FRITTY12348546
@FRITTY12348546 8 ай бұрын
Same issue
@raypi2297
@raypi2297 7 ай бұрын
I'am work. what's log you seeing?
@HAMZABOURGUIGA
@HAMZABOURGUIGA 6 ай бұрын
same here, please further information for this issue...
@dawidlelito
@dawidlelito Ай бұрын
any helps how to add metricbeat as docker to the stack for cluster monitoring?
@Karan-gk7jw
@Karan-gk7jw 6 ай бұрын
Hey sir the volume you are talking about around 3:30 can we use kafka as the volume
@TherealLeroyJenkins
@TherealLeroyJenkins 6 ай бұрын
The error message you're seeing is related to Elasticsearch bootstrap checks that are performed when Elasticsearch detects that it is running in production mode. Specifically, the error: ``` bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] ``` indicates that the `vm.max_map_count` setting on your host is set too low for Elasticsearch to operate reliably in a production environment. This setting defines the maximum number of memory map areas a process may have. Elasticsearch recommends setting this to at least `262144`. ### Fixing the `vm.max_map_count` Issue To resolve this issue, you need to increase the `vm.max_map_count` setting on your host system. This setting is applied at the OS level, not within Docker containers, so you must set it on the host that runs your Docker daemon. #### For Linux Hosts 1. **Temporarily (does not survive reboot):** You can temporarily set `vm.max_map_count` to the recommended value by running the following command on your host: ```sh sudo sysctl -w vm.max_map_count=262144 ``` 2. **Permanently (survives reboot):** To make the change permanent, so it persists across reboots, add the following line to `/etc/sysctl.conf`: ``` vm.max_map_count=262144 ``` Then, apply the changes with: ```sh sudo sysctl -p ``` #### Verifying the Change To verify that the setting has been applied, run: ```sh sysctl vm.max_map_count ``` You should see `vm.max_map_count = 262144` as the output. ### After Adjusting `vm.max_map_count` Once you've adjusted the `vm.max_map_count` on your host, you should be able to start your Elasticsearch service without encountering the previous bootstrap check failure. If you're using Docker Compose, make sure to restart your services for the changes to take effect: ```sh docker-compose down docker-compose up -d ``` ### This took me a couple of hours to figure out, but it had me stumped as well. hope it helps. I also increased my total ram on the VM to 16gb of ram, and she's pegging around 85% usage. will most likely end up increasing to 20 gb. but I am also looking at decreasing number of nodes. I only just started. thanks to OP. I was stuck on this ELK stack for a while.
@zhajikun5309
@zhajikun5309 3 ай бұрын
I run your docker-compose file but get this error in Kinaba: FATAL Error: [config validation of [xpack.encryptedSavedObjects].encryptionKey]: value has length [16] but it must have a minimum length of [32].
@wbarbosabr
@wbarbosabr 3 ай бұрын
ENCRIPTION_KEY on .env should have at least 32 chars, the default value has 16...
@meysamzoghi
@meysamzoghi Жыл бұрын
hi thanks for your video plz make video about rolling upgrade cluster node elasticsearch i want to upgrade with rolling upgrade but when i upgrade node 1, i give error: 1.master node disconnected, restarting discovery 2.this node is locked into cluster UUID help me if you can
@therus000
@therus000 11 ай бұрын
thanx for video, so nice work but can u share please that docker-compose file and config file for logstash
@AliYounesGo4IT
@AliYounesGo4IT 11 ай бұрын
I will try to upload it soon
@avalagum7957
@avalagum7957 8 ай бұрын
The SSL thingy makes everything look complicated. Is there any setup with only 1 node for elasticsearch without SSL?
@AliYounesGo4IT
@AliYounesGo4IT 8 ай бұрын
with Elasticsearch 8.x and on, security is enabled by default. You have to explicitly disable it. I never tried it, but you can try creating docker-compose.yml file with only two services (es and kibana) and make sure to set xpack.security.enabled: false
@patilavinash7406
@patilavinash7406 4 ай бұрын
Hi I want to install ELK on a test/production server can you please me for that
@priyashukla7516
@priyashukla7516 Ай бұрын
How can I take data from MySQL db?
@cpptip9150
@cpptip9150 9 ай бұрын
geat tutorial
@정환문-g3e
@정환문-g3e 6 ай бұрын
hello I enjoyed watching the KZbin video I added the settings and files as shown on KZbin and ran it, but the same error as Hardy occurred. ✔ Network elasticity created ✔ Container elkdocker-setup-1 Healthy ✘ Container elkdocker-es01-1 Error ✔ Container elkdocker-kibana-1 Created ✔ Container elkdocker-es02-1 Created ✔ Container elkdocker-es03-1 Created ✔ Container elkdocker-logstash-1 Created dependency failed to start: container elkdocker-es01-1 exited (78) I wonder if there is any workaround. And I'm curious how to enter the url for kibana to appear in the browser. take care
@naveenbala4140
@naveenbala4140 11 ай бұрын
Where is encryption key
@geusilva6632
@geusilva6632 9 ай бұрын
You don't need to set this parameter. It will give you a warning but you can ignore it.
@Ethan777100
@Ethan777100 11 ай бұрын
what terminals and packages do i need in VS Code?
@AliYounesGo4IT
@AliYounesGo4IT 11 ай бұрын
I installed the Remote - SSH extension to connect to the remote Linux host. Other than that I have YAML and json installed.
@Ethan777100
@Ethan777100 11 ай бұрын
Oh. 1. So does this mean I need to have Linux in my computer? I only have Windows 10. 2. Must I have the Remote-SSH extension? Because my situation is that i need to host my data within the same machine as local host. But i wanna basis from your Video. @@AliYounesGo4IT
@Ethan777100
@Ethan777100 11 ай бұрын
I'm actually trying to replicate your setup on my computer but difference is I'm using localhost. I'm running into issues currently regarding docker socket. There is a bad gateaway connection that causes kibana container to hang up and Exit because it fails to establish a connection with Elasticsearch container. On my elastic search container, when I do a curl request to localhost 9200, I dont get a response either. What is going wrong in my setup? Currently on ELK version 8.11.0 across all components.
@ashutoshtiwari4398
@ashutoshtiwari4398 9 ай бұрын
Did you get any solution?
@dimakovalev-f6p
@dimakovalev-f6p 10 ай бұрын
бля епересетээээээээ а где файлики с кодомммм???????
@AliYounesGo4IT
@AliYounesGo4IT 10 ай бұрын
the files are on the official documentation site. I'm just explaining how to use them.
@arggomes
@arggomes 7 ай бұрын
Hi Ali, nice explanation, but i am receiving the following error below. Creating agomes_setup_1 ... done Creating agomes_es01_1 ... done Creating agomes_kibana_1 ... done Creating agomes_es02_1 ... done Creating agomes_es03_1 ... done Creating agomes_logstash_1 ... error ERROR: for agomes_logstash_1 Cannot start service logstash: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/agomes/logstash.conf" to rootfs at "/usr/share/logstash/pipeline/logstash.conf": mount /home/agomes/logstash.conf:/usr/share/logstash/pipeline/logstash.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: for logstash Cannot start service logstash: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/agomes/logstash.conf" to rootfs at "/usr/share/logstash/pipeline/logstash.conf": mount /home/agomes/logstash.conf:/usr/share/logstash/pipeline/logstash.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: Encountered errors while bringing up the project.
@mr0ffka
@mr0ffka 5 ай бұрын
Did you find solution?
Build a Custom Docker Image for Logstash
15:37
Ali Younes
Рет қаралды 2,7 М.
버블티로 부자 구별하는법4
00:11
진영민yeongmin
Рет қаралды 17 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 608 М.
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 18 МЛН
Про Elastic Stack за 15 минут.
15:23
ИТ-Видео
Рет қаралды 67 М.
18 Weird and Wonderful ways I use Docker
26:18
NetworkChuck
Рет қаралды 291 М.
Golang Session-2 (Learn Go from Jiten Palaparthi)
56:37
Learn Golang, Rust and more
Рет қаралды 73
Elasticsearch + Docker Compose: Part 1 & 2 - Full Explanation
1:30:25
Evermight Systems
Рет қаралды 8 М.
Installing and Configuring Logstash to Ingest Fortinet Syslogs
24:55
Beginner's Crash Course to Elastic Stack -  Part 1: Intro to Elasticsearch and Kibana
56:42
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 157 М.
Elasticsearch & Kibana on Docker (October 2022, Elasticsearch 8.4)
55:35