ELK Logging Stack
Elasticsearch + Logstash + Kibana — pre-wired with sane memory limits, ILM index lifecycle policy, and a Filebeat shipper config.
ELK Logging Stack
A production-tuned Elastic Stack deployment with memory limits that won't crash your host, a pre-configured Index Lifecycle Management (ILM) policy to keep disk usage under control, and a Filebeat config ready to ship logs from any service.
What's Included
- Elasticsearch 8 — Single-node cluster with security disabled for self-hosted use; persistent volume for index storage
- Logstash — Pre-configured pipeline: Beats input → filter with grok patterns → Elasticsearch output
- Kibana 8 — Matched version; bootstraps with the Elasticsearch connection on first start
- Filebeat — Sidecar log shipper configured to tail Docker container logs and forward to Logstash
Production-Ready Configuration
- JVM heap sizes explicitly set for both Elasticsearch and Logstash — prevents runaway memory on shared hosts
- ILM policy pre-loaded: hot phase 7 days, warm phase 30 days, delete phase 60 days
- Index template applied automatically on first start — correct mappings for log timestamps and log levels
- Health checks on Elasticsearch — Logstash and Kibana wait until the cluster is green before connecting
- Filebeat auto-discovers running Docker containers via the Docker socket
- All passwords and API keys managed via
.env
What You Get
docker-compose.yml— fully configured four-service stack with memory limitslogstash/pipeline/logstash.conf— annotated input/filter/output pipelinelogstash/config/jvm.options— tuned heap settingskibana/kibana.yml— pre-wired to Elasticsearchfilebeat/filebeat.yml— Docker autodiscovery configurationscripts/init-ilm.sh— ILM policy and index template bootstrap script.env.examplewith every variable documentedREADME.md— setup guide, memory tuning notes, ILM customization, and Kibana first-run steps
Service URLs
| Service | URL |
|---|---|
| Kibana | http://localhost:5601 |
| Elasticsearch API | http://localhost:9200 |
| Logstash Beats Port | localhost:5044 |
Requirements
Docker Engine with the Compose plugin on Linux. Set vm.max_map_count=262144 on the host (included in README). 4 GB RAM minimum; 8 GB recommended.