Watch the videos: https://youtube.com/playlist?list=PL8jxeSupxsFc37mhFAvq5xlPttL_Bgf10
This repository contains a Docker setup for a Laravel application and Elk Stack.. The Laravel application will log to the storage\logs
directory. Filebeat will read the logs and send them to Logstash running in another Docker Compose stack, where you can then configure it to do whatever you want with the logs. these logs from Logstash will save in Elastic, and finally Kibana will read the logs and visualize them
- Clone this repository:
git clone https://github.com/AhmedHdeawy/laravel-logs-ELK.git
cd laravel-logs-ELK
- Start Laravel App Docker Compose with the following commands:
cd laravel-app
sail up
- Start ELK Stach Docker Compose with the following commands:
cd elk
docker-compose up
Once the Docker Compose stacks are running, then evenry thing is ready.
open your browser to access Kibana dashboard through http://localhost:5601
Go to Stack Management
=> Index patterns
=> Create index pattern
Write the name laravel-*
and choose timestamp
from Timestamp field dropdown
Finally, from Kibana navigation panel, choose Discover
and then select our Index laravel-*
.
Congratulations, now you can see your logs and search for your logs
This code is released under the MIT License.