π₯ I Hooked Up Grafana + Prometheus on EC2 to Monitor Everything
π The Problem
I needed metrics β fast. CPU, memory, disk usage, traffic.
But I didnβt want to pay for a monitoring SaaS or wait 24 hours for AWS dashboards to populate.
So I set out to build my own **barebones observability stack** using open source tools I could trust.
π οΈ The Fix: Self-Hosted Grafana + Prometheus
Using an EC2 instance and a bit of Ansible, I created a stack that:
- π¦ Installs Prometheus and Grafana automatically
- π― Configures basic scrape jobs (like node_exporter)
- π Sets up security groups and firewall rules for ports 9090 & 3000
- π Gives me a fully working Grafana UI with Prometheus data sources
The best part? Anyone can run this script and have Grafana + Prometheus running in one click.
No setup headaches. Just instant dashboards, so you can monitor what actually matters.
I originally built this setup while at AlphaPoint β we wanted engineers to spend less time setting up Grafana and more time using it. This script made onboarding observability nearly instant.
π¬ GitHub Link
Full code and automation script are here:
π
github.com/chinmaya-chhatre/grafana-prometheus-integration
π What Changed
- π Full visibility into instance-level metrics in under 10 minutes
- π Tracked system issues without relying on CloudWatch or external tools
- π§ Learned a lot about Prometheus scraping intervals and Grafana dashboards
βοΈ Tradeoffs I Made
- No Long-Term Storage: Prometheus stores data locally β fine for short-term, but not ideal for long-term trend analysis
- No AlertManager Setup: Focused on dashboards and metrics first β alerts can come next
- Manual Node Exporter Install: Didnβt bake that into the automation (yet)
π§ What I'd Add Next
- π¨ Add AlertManager + custom threshold alerts
- π Build out full dashboard template for reusability
- π§± Use Docker to make setup even more portable
π§΅ Why Iβm Sharing This
Because every engineer should know how to spin up their own monitoring.
Because tools like Grafana and Prometheus deserve more love.
And because sometimes, DIY gives you more power and fewer headaches than a βmagicβ SaaS platform.
π Bonus Links