|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * observability/otel/otel-collector/otel-collector-receivers.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: REFERENCE |
| 6 | +[id="otel-receivers-prometheus-remote-write-receiver_{context}"] |
| 7 | += Prometheus Remote Write Receiver |
| 8 | + |
| 9 | +[role="_abstract"] |
| 10 | +The Prometheus Remote Write Receiver receives metrics from Prometheus via the Remote Write protocol and converts them to the OpenTelemetry format. This receiver supports only the Prometheus Remote Write v2 protocol. |
| 11 | + |
| 12 | +:FeatureName: The Prometheus Remote Write Receiver |
| 13 | +include::snippets/technology-preview.adoc[] |
| 14 | + |
| 15 | +.OpenTelemetry Collector custom resource with the enabled Prometheus Remote Write Receiver |
| 16 | +[source,yaml] |
| 17 | +---- |
| 18 | +# ... |
| 19 | + config: |
| 20 | + receivers: |
| 21 | + prometheusremotewrite: |
| 22 | + endpoint: 0.0.0.0:9009 # <1> |
| 23 | + service: |
| 24 | + pipelines: |
| 25 | + metrics: |
| 26 | + receivers: [prometheusremotewrite] |
| 27 | +# ... |
| 28 | +---- |
| 29 | +<1> The endpoint where the receiver listens for Prometheus Remote Write requests. |
| 30 | + |
| 31 | +The following are the prerequisites for using the Prometheus Remote Write Receiver with Prometheus: |
| 32 | + |
| 33 | +* Prometheus is started with the metadata WAL records feature flag enabled: |
| 34 | ++ |
| 35 | +[source,yaml] |
| 36 | +---- |
| 37 | +./prometheus --config.file config.yml --enable-feature=metadata-wal-records |
| 38 | +---- |
| 39 | +
|
| 40 | +* Prometheus Remote Write v2 Protocol is enabled in the Prometheus configuration file: |
| 41 | ++ |
| 42 | +[source,yaml] |
| 43 | +---- |
| 44 | +remote_write: |
| 45 | + - url: "<your_chosen_prometheus_remote_write_receiver_endpoint>" |
| 46 | + protobuf_message: io.prometheus.write.v2.Request |
| 47 | +---- |
| 48 | +
|
| 49 | +* Native histograms are enabled in Prometheus. For more information about enabling native histograms in Prometheus, see the Prometheus documentation. |
| 50 | +
|
| 51 | +[role="_additional-resources"] |
| 52 | +.Additional resources |
| 53 | +* link:https://prometheus.io/docs/prometheus/latest/feature_flags/#metadata-wal-records[Metadata WAL Records] |
| 54 | +* link:https://prometheus.io/docs/specs/prw/remote_write_spec_2_0/[Prometheus Remote-Write 2.0 specification [EXPERIMENTAL]] |
| 55 | +* link:https://prometheus.io/docs/specs/native_histograms/[Native Histograms] |
0 commit comments