Grafana Alloy Has a Free OpenTelemetry Collector
You run Prometheus for metrics, Fluentd for logs, Jaeger agent for traces. Three agents on every server. Grafana Alloy replaces all three with one binary.
What Alloy Does
Grafana Alloy (formerly Grafana Agent) is a vendor-agnostic OpenTelemetry collector:
- Metrics — scrape Prometheus endpoints, push to Mimir/Prometheus
- Logs — tail files, parse, send to Loki
- Traces — receive OTLP, send to Tempo/Jaeger
- Profiles — continuous profiling with Pyroscope
- Single binary — one agent for all telemetry types
- River configuration — programmable, type-safe config language
Quick Start
// alloy config
prometheus.scrape "default" {
targets = [{"__address__" = "localhost:8080"}]
forward_to = [prometheus.remote_write.mimir.receiver]
}
prometheus.remote_write "mimir" {
endpoint {
url = "http://mimir:9009/api/v1/push"
}
}
loki.source.file "logs" {
targets = [{"__path__" = "/var/log/*.log"}]
forward_to = [loki.write.default.receiver]
}
loki.write "default" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
}
}
Why Alloy Over Separate Agents
- One binary — instead of 3-4 agents per server
- OpenTelemetry native — speaks OTLP, Prometheus, Loki natively
- River config — programmable, no YAML hell
- Built-in UI — web interface to debug pipelines
- Component system — compose processing pipelines like LEGO
Alloy vs Other Collectors
| Feature | Alloy | OTel Collector | Vector |
|---|---|---|---|
| Metrics | ✅ Native | ✅ | ✅ |
| Logs | ✅ Native | ✅ | ✅ |
| Traces | ✅ Native | ✅ | ✅ |
| Profiles | ✅ | ❌ | ❌ |
| Config | River | YAML | TOML |
| Grafana native | ✅ | ❌ | ❌ |
Install
# Linux
curl -fsSL https://apt.grafana.com/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/grafana.gpg
sudo apt install alloy
# Docker
docker run -v ./config.alloy:/etc/alloy/config.alloy grafana/alloy
# Kubernetes
helm install alloy grafana/alloy
Building an observability stack? I help teams set up Grafana + Alloy for unified metrics, logs, and traces.
📧 spinov001@gmail.com — Observability consulting
Follow for more DevOps tool reviews.
Top comments (0)