- Dockered Spring Boot App
- logback-spring.xml configured using LogstashTcpSocketAppender to transfer log statements to a logstash instance
- executed in a Docker container
- ELK Docker container
- Logstash
- receiving log statements from the spring boot app via tcp
- persisting them in elasticsearch
- Elasticsearch
- Kibana
- Dashboard to discover log data stored in elasticsearch
- Logstash
- All containers linked via Docker network
- build the docker images by executing
mvn clean install
- startup Docker containers by executing
docker-compose up
- create an index pattern, f.e.
logstash-*
, in Kibana dashboard
- Docker time out of sync with OSX host after system sleep
These were very helpful resources when building this small exapmle:
- https://elk-docker.readthedocs.io
- https://blog.codecentric.de/2016/07/spring-boot-apache-cxf-logging-monitoring-logback-elasticsearch-logstash-kibana/
- https://blog.codecentric.de/en/2014/10/log-management-spring-boot-applications-logstash-elastichsearch-kibana/
- https://springframework.guru/using-logback-spring-boot/
- https://github.com/logstash/logstash-logback-encoder
- https://spring.io/guides/gs/scheduling-tasks/