Cette page est affichée en anglais. Une traduction française est en cours.
SkillsApr 16, 2026·3 min de lecture

Grafana Alloy — OpenTelemetry Collector Distribution by Grafana

Collect, transform, and ship telemetry data with Grafana Alloy. A vendor-neutral OpenTelemetry collector with a programmable pipeline, built-in Prometheus scraping, and native Loki and Tempo support.

Prêt pour agents

Installation avec revue préalable

Cet actif nécessite une revue. Le prompt copié demande un dry-run, affiche les écritures, puis continue seulement après confirmation.

Needs Confirmation · 64/100Policy : confirmer
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Community
Point d'entrée
Grafana Alloy Telemetry
Commande avec revue préalable
npx -y tokrepo@latest install 32274adf-393a-11f1-9bc6-00163e2b0d79 --target codex

Dry-run d'abord, confirmez les écritures, puis lancez cette commande.

TL;DR
Grafana Alloy is a vendor-neutral OpenTelemetry collector with built-in Prometheus scraping and Loki log support.
§01

What it is

Grafana Alloy is an open-source, vendor-neutral telemetry collector from Grafana Labs. It unifies metrics, logs, traces, and profiles into a single agent, serving as the replacement for the older Grafana Agent.

Alloy targets platform engineers and SREs who need a single binary to scrape Prometheus metrics, collect logs for Loki, forward traces to Tempo, and ship profiles to Pyroscope -- all with a programmable pipeline language.

§02

How it saves time or tokens

Instead of deploying separate agents for each telemetry signal (Prometheus exporter, Fluentd, Jaeger agent), Alloy consolidates them into one binary with one config syntax. This reduces the number of running processes, config files, and deployment manifests a team must maintain.

§03

How to use

  1. Install Alloy via package manager or Docker:
# Linux (apt)
sudo apt update && sudo apt install alloy
# Docker
docker run -v ./config.alloy:/etc/alloy/config.alloy -p 12345:12345 grafana/alloy:latest
  1. Write a config file using the Alloy syntax (a HCL-like pipeline language).
  1. Start Alloy pointing to your config: alloy run config.alloy.
§04

Example

// config.alloy -- scrape Prometheus metrics and forward to Mimir
prometheus.scrape 'default' {
  targets = [{'__address__' = 'localhost:9090'}]
  forward_to = [prometheus.remote_write.mimir.receiver]
}

prometheus.remote_write 'mimir' {
  endpoint {
    url = 'http://mimir:9009/api/v1/push'
  }
}

// Collect logs and send to Loki
loki.source.file 'app_logs' {
  targets    = [{'__path__' = '/var/log/app/*.log'}]
  forward_to = [loki.write.default.receiver]
}

loki.write 'default' {
  endpoint {
    url = 'http://loki:3100/loki/api/v1/push'
  }
}
§05

Related on TokRepo

§06

Common pitfalls

  • Alloy syntax is not YAML. Existing Grafana Agent YAML configs need conversion using alloy convert.
  • Running Alloy alongside an existing Prometheus instance on the same host can cause port conflicts on 9090.
  • Memory usage scales with the number of active scrape targets and log tails. Set resource limits in Docker or Kubernetes to avoid OOM.

Questions fréquentes

How does Grafana Alloy differ from the OpenTelemetry Collector?+

Alloy is Grafana Labs distribution of the OpenTelemetry Collector with added components for Prometheus scraping, Loki log collection, Tempo trace forwarding, and Pyroscope profiling. It uses a custom pipeline syntax instead of YAML-based OTel Collector config.

Does Alloy replace Grafana Agent?+

Yes. Grafana Labs deprecated Grafana Agent in favor of Alloy. Alloy is the successor that combines Grafana Agent Static mode and Flow mode into one product with the Alloy config syntax.

What telemetry signals does Alloy support?+

Alloy handles four signals: metrics (Prometheus format), logs (Loki format), traces (OpenTelemetry/Tempo), and continuous profiling (Pyroscope). All four can be collected, transformed, and shipped from a single Alloy instance.

Can Alloy send data to non-Grafana backends?+

Yes. Alloy supports any OTLP-compatible endpoint for traces, any Prometheus remote-write endpoint for metrics, and any syslog or HTTP endpoint for logs. It is vendor-neutral despite being built by Grafana Labs.

What is the Alloy config syntax?+

Alloy uses a HCL-inspired declarative syntax where you define components (sources, processors, exporters) and wire them together via forward_to references. This replaces both YAML configs and the older River syntax from Grafana Agent Flow.

Sources citées (3)

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires