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 auser_idor asession_idin the labels of a Prometheus metric) without usingrelabelcomponents 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"
}
}My progress
Sign in to track your progress and take notes. Sign in
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...