4. Installation #
Deployment on Linux, Docker, and Kubernetes.
Which method to choose? #
| Environment | Method | For |
|---|---|---|
| Linux servers | deb or rpm package | systemd service, updates through the package manager |
| Workstation, CI, prototype | Docker | Quick trial without touching the system |
| Kubernetes | Helm chart | DaemonSet or cluster (see the dedicated chapter) |
| No privileges | GitHub binary | One-off trial |
With Docker #
docker run --name alloy \
-v "$PWD/config.alloy:/etc/alloy/config.alloy" \
-p 12345:12345 \
grafana/alloy:v1.21.3 \
run --server.http.listen-addr=0.0.0.0:12345 \
--storage.path=/var/lib/alloy/data \
/etc/alloy/config.alloyThe UI does not respond? By default, Alloy listens on127.0.0.1:12345, so only inside the container. Hence the--server.http.listen-addr=0.0.0.0:12345option. Outside a container, keep the default, or protect this port: the UI exposes the configuration.
On Debian or Ubuntu #
sudo mkdir -p /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/grafana.asc https://apt.grafana.com/gpg-full.key
echo "deb [signed-by=/etc/apt/keyrings/grafana.asc] https://apt.grafana.com stable main" \
| sudo tee /etc/apt/sources.list.d/grafana.list
sudo apt-get update
sudo apt-get install alloy
sudo systemctl enable --now alloy
sudo systemctl status alloy
sudo journalctl -u alloy -fThe configuration lives in /etc/alloy/config.alloy. Service options are in /etc/default/alloy (/etc/sysconfig/alloy on RHEL): CUSTOM_ARGS takes the listen address, for example.
On Kubernetes #
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm install alloy grafana/alloy -n monitoring --create-namespace -f values.yamlDeployment and its modes are covered in the Deploying at scale chapter.
Checking the installation #
alloy --version
alloy validate config.alloy
curl http://localhost:12345/-/ready # Alloy is ready.
curl http://localhost:12345/-/healthy # All Alloy components are healthy.
curl -X POST http://localhost:12345/-/reload # config reloaded| Check | Expected response |
|---|---|
/-/ready | Alloy is ready. |
/-/healthy | All Alloy components are healthy. |
http://localhost:12345 | UI and component graph |
Best practice: pin a precise image tag (grafana/alloy:v1.21.3), and runalloy validatein your CI before each deployment.
My progress
Sign in to track your progress and take notes. Sign in
💬 Recent discussions about this course
- Alloy : recevoir de l'OTLP et l'envoyer vers Tempo et Mimir✓ solved · 1 reply(ies)
Ask a question about this lesson →See all discussions about this course
Course Glossary
Grafana Alloy
An open-source, vendor-neutral telemetry collector designed to replace Grafana Agent, fully compatible with OpenTelemetry (OTel).
Recommended Articles
Grafana Alloy: Understanding and exploiting the User Interface (UI)
Discover how to enable, secure, and use Grafana Alloy's built-in web interface to visualize your ...
Grafana Alloy: collecting and transforming telemetry
Learn how to use Grafana Alloy to collect, transform and route logs, metrics and traces. Discover...
The LGTM stack (Loki, Grafana, Tempo, Mimir): architecture and setup
Grafana Labs' LGTM stack: Loki for logs, Grafana for visualization, Tempo for traces, Mimir for m...
Grafana Faro: architecture and installation
Install Grafana Faro: the web SDK (npm or CDN), Alloy's faro.receiver, sending to Loki and Tempo,...
OpenTelemetry Collector, Grafana Alloy and Bindplane: comparing three approaches to telemetry pipelines
Detailed comparison of three ways to manage telemetry pipelines: the OpenTelemetry Collector in Y...
Grafana Cloud: getting started with the managed platform (Mimir, Loki, Tempo, Alloy)
Discover Grafana Cloud: creating a stack, the free tier, sending metrics, logs and traces with Al...
Installing Grafana Loki (Docker Compose, binary and Helm)
Install and validate Grafana Loki: minimal configuration, Docker Compose with Grafana and Alloy, ...
Grafana Alloy: Advanced Deployment and Clustering
Learn how to manage large-scale Grafana Alloy deployments. Configure Clustering mode for high ava...
Grafana Alloy vs Grafana Agent vs Promtail: which one to choose?
Discover how telemetry collectors have evolved in the Grafana ecosystem. A detailed comparison of...