Centralized logging is a must, especially when you have multiple instances running, logs scattered everywhere, and no idea where that 500 error came from.
Standing up ELK (Elasticsearch, Logstash, Kibana) can be painful. I wanted a single EC2 instance running the full stack, logs routed and searchable, all with one command. No manual installs. No clicky walkthroughs.
The Fix: A Bash-Based ELK Installer
I wrote a bash script that:
- ⚙️Sets up an EC2 instance with IAM and Security Group preconfigured
- 📦Installs Elasticsearch, Logstash, and Kibana with version compatibility handled
- 🔐Opens the right ports (9200, 5601) so it works out of the box
- 🧪Runs a test log to validate the pipeline end-to-end
Result: a working, log-ready ELK stack you can SSH into and start using immediately.
GitHub: github.com/chinmaya-chhatre/elk-integration
What Changed
- 📊Full visibility into application logs within minutes
- 🔧Log search and dashboarding possible without any third-party tools
- 🧹Reduced log noise with filters and pipeline tuning
Setting up ELK should not require a YouTube tutorial plus 2 hours. Log visibility is too important to delay.
Tradeoffs I Made
- 💻Single-instance stack: no HA or cluster setup, perfect for demos and small apps
- 🔄Defaults to ephemeral disk: logs reset on restart unless customized
- 🔓Left auth open for testing: production use needs auth plus HTTPS
What I Would Add Next
- 🔐Add basic auth and TLS config for Kibana access
- 📤Push logs from multiple instances via Filebeat or FluentBit
- 🔨Package it as a reusable shell module or Terraform wrapper
More from the Tech Blog