Paid vs open-source
| Paid tools | Open-source stack |
|---|---|
| Datadog, New Relic, Dynatrace | Prometheus, Grafana, Loki |
| Fast to start, recurring cost | More setup, full control |
| Vendor lock-in risk | Portable, self-hosted |
Open-source advantages
- No per-host SaaS bill at small/medium scale
- Full ownership of data
- Strong ecosystem (exporters, dashboards, alerts)
Production monitoring flow
Application / Node Exporter
↓
Prometheus (scrape + store)
↓
Grafana (dashboards + alerts)
↓
Loki (logs) ← Promtail / app shippers
Recommended AWS architecture
┌─────────────────────┐ ┌──────────────────────┐
│ Application Server │ │ Monitoring Server │
│ - Node.js / Nginx │────▶│ - Prometheus │
│ - Node Exporter │ │ - Grafana │
│ - App /metrics │ │ - Loki │
└─────────────────────┘ └──────────────────────┘
Why separate monitoring?
| Application server | Monitoring server |
|---|---|
| Serves users | Observes the fleet |
| Scale with traffic | Stable, always-on tooling |
| App crash should not kill metrics | Survives app failure |
Keep security groups tight: allow Prometheus scrape ports from the monitoring server only; expose Grafana to your IP (or VPN).
For a first lab you can run the full stack on one EC2. Split app vs monitoring before production.