Skip to main content

exporter.prometheus_remote_write

Prometheus Remote Write exporter allows you to send monitoring data to compatible backends that support the Prometheus remote_write API. This enables integration with various time-series databases and monitoring systems.

Compatible Backends

  • Grafana Alloy (prometheus.receive_http component)
  • Prometheus (with remote_write receiver enabled)
  • Grafana Mimir
  • Thanos
  • Victoria Metrics

Format

  • Protocol: Prometheus remote_write API (protobuf)
  • Compression: Snappy
  • Endpoint: /api/v1/metrics/write
  • Content-Type: application/x-protobuf
  • Content-Encoding: snappy

Limitations

warning

This exporter only supports gauge metrics. Histograms with buckets (_bucket, _sum, _count suffixes) are not supported.

If you need histogram metrics for percentile calculations or latency distribution analysis, use the OTLP exporter instead, which provides full histogram support.

Arguments

You can use the following arguments with exporter.prometheus_remote_write:

NameTypeDescriptionDefaultRequired
urlstringRemote write URL endpoint (e.g., http://localhost:9999/api/v1/metrics/write).yes
jobstringPrometheus job label to attach to all metrics.zookoo-stmno
instancestringPrometheus instance label to attach to all metrics.no
authobjectAuthentication configuration (see auth block below).no
metric_prefixstringOptional prefix to prepend to all metric names.probe_no

metric_prefix is an optional string that, if provided, will be prepended to all metric names exported by this exporter. This can be useful for namespacing metrics in environments where multiple applications or services are sending metrics to the same backend. If not specified or empty, prefix applied is probe_.

Auth Block

NameTypeDescriptionDefaultRequired
usernamestringUsername for basic authentication.no
passwordstringPassword for basic authentication.no
bearerstringBearer token for authentication.no

Example

exporter "prometheus_remote_write" "main" {
url = "http://localhost:9999/api/v1/metrics/write"
}

Resources