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
Ingérer des métriques dans VictoriaMetrics : scraping, vmagent et remote write
Toutes les façons d'alimenter VictoriaMetrics : remote write depuis Prometheus, scraping intégré,...
Thanos Receive : ingérer du remote write et gérer le multi-tenant
Utiliser Thanos Receive : mode push avec remote write, hashring, réplication, multi-tenancy, conf...
Grafana Alloy vs OpenTelemetry Collector: Which One Should You Choose?
A detailed comparison between Grafana Alloy and the OpenTelemetry Collector. Discover the strengt...
Collecter des logs vers Loki : Alloy, Promtail, Docker et OpenTelemetry
Envoyer des logs vers Loki : Grafana Alloy, Promtail, driver Docker, OTLP, bons labels, parsing e...
Observer un test k6 : Prometheus, Grafana et corrélation avec le système testé
Envoyer les résultats de k6 dans Prometheus (remote write) ou en OpenTelemetry, les visualiser da...
Grafana Alloy: Trace Management with Tempo
Dive into distributed trace processing. Learn how to ingest OTLP, Jaeger, or Zipkin traces with G...
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: The importance of Self-Monitoring
Discover why and how to configure Grafana Alloy so that it monitors itself, collecting its own lo...
Grafana Alloy vs Grafana Agent vs Promtail : Lequel choisir ?
Découvrez l'évolution des collecteurs de télémétrie de l'écosystème Grafana. Comparatif détaillé ...