Logging in Spring Boot with the Elastic Stack
summary
Shows how to emit ECS JSON logs from Logback/Log4j2 so Filebeat can ship directly to Filebeat → Elasticsearch without Logstash, keeping stack traces as single JSON lines and avoiding Grok. Demo uses a Spring Boot Security app that generates ~130 login events (46 after filtering), adds MDC fields like user.name, url and IP, and visualizes counts in Kibana Lens. Adds the Java APM agent for correlated traces and mentions automated index lifecycle/30‑day retention. Slides and demo code on the GitHub repo.
AI-written summary · about
chapters (30)
- 0:00Intro
- 0:49Logs
- 1:20SSH
- 3:09Why Elastic Search
- 4:25Log Stash
- 5:34Regular Expressions
- 6:49Elastic Common Scheme
- 8:52Logging Java
- 10:23Demo
- 12:33Logging Errors
- 13:28Cabana
- 13:53Elastic Stack Configuration
- 15:48Viewing Login Events
- 17:53Logs View
- 21:43Denial of Service
- 22:03Event Visualization
- 22:48Length Visualization
- 23:08Filter Fields
- 24:28Visualizations
- 24:48Document Structure
- 25:43Domain Specific
- 26:13Tracing Agent
- 28:43Lifecycle Management
- 29:23Summary
- 30:13Wrap up
- 31:03Questions
- 31:53JSON Logs
- 32:33New Line Descriptor
- 33:03How to cut off properties
- 34:13Is it easy to jump from Log4J to BE








