RousselTMLEARNING

Article · Alloy: From Discovery to Expertise

Remote Write

3. Remote Write #

Forwarding data to Grafana Cloud or a local instance.

Metrics forwarding #

The prometheus.remote_write component takes the scraped metrics and pushes them to a compatible time series database, such as Grafana Mimir, Prometheus (with remote_write enabled), or Grafana Cloud. It handles authentication (Basic Auth, Bearer Token), buffering (WAL) to prevent data loss in case of a network outage, and compression.


Best Practice: Always configure the wal (Write-Ahead Log) component for your forwarders. This ensures that in the event of a database outage, Alloy caches the metrics on disk and automatically resends them once the connection is restored.
Common Mistake: Scraping metrics with high cardinality (e.g., including a user_id or a session_id in the labels of a Prometheus metric) without using relabel components to filter them. This will lead to a cardinality explosion and saturate your backend.
prometheus.remote_write "default" {
  endpoint {
    url = "https://prometheus-prod.grafana.net/api/prom/push"
  }
  wal {
    truncate_frequency = "2h"
    max_keepalive_time = "5m"
  }
}

📄 Grafana Alloy: Metrics Collection (Prometheus & Ecosystem) →

My progress

  • ⏱ Estimated time : ≈ 3 min

Sign in to track your progress and take notes. Sign in

💬 Ask a question

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: Syntax and Configuration (Alloy Language: River)

As part of a Grafana training or observability training, master the declarative syntax of Grafana...

Référence des Composants Grafana Alloy

Un guide de référence complet sur tous les composants disponibles dans Grafana Alloy, organisé pa...

Grafana Alloy : Collecte et Transformation de Télémétrie

Apprenez à utiliser Grafana Alloy pour collecter, transformer et acheminer logs, métriques et tra...

Pourquoi Grafana Mimir ? Architecture et modes de déploiement

Les limites de Prometheus seul, ce qu'apporte Mimir (stockage long terme, haute disponibilité, mu...

La stack LGTM (Loki, Grafana, Tempo, Mimir) : architecture et mise en place

Comprendre la stack LGTM de Grafana Labs : Loki pour les logs, Grafana pour la visualisation, Tem...

Grafana Alloy: Log Management with Loki

Discover how to configure Grafana Alloy to read log files, journald, or network streams, process ...

OTLP expliqué : comprendre le protocole OpenTelemetry

Découvrez le protocole OTLP expliqué simplement. Comprendre les différences entre gRPC et HTTP po...

OpenTelemetry Collector, Grafana Alloy et Bindplane : comparer trois approches des pipelines de télémétrie

Comparatif détaillé de trois façons de gérer des pipelines de télémétrie : l'OpenTelemetry Collec...

Grafana Alloy: Introduction and Architecture

Discover the fundamental concepts of Grafana Alloy, the transition from the static Agent to Alloy...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!