Please note that it isn't recommended to send application data to Prometheus via remote_write protocol, since Prometheus is designed to scrape metrics from the targets specified in Prometheus config. This is known as pull model, while you are trying to push metrics to Prometheus aka push model.

If you need pushing application metrics to Prometheus, then the following options exist:

  • Pushing metrics to pushgateway. Please read when to use the pushgateway before using it.

  • Pushing metrics to statsd_exporter.

  • Pushing application metrics to VictoriaMetrics (this is an alternative Prometheus-like monitoring system) via any supported text-based data ingestion protocol:

    • Prometheus text exposition format
    • Graphite
    • Influx line protocol
    • OpenTSDB
    • DataDog
    • JSON
    • CSV

    All these protocols are much easier to implement and debug comparing to Prometheus remote_write protocol, since these protocols are text-based, while Prometheus remote_write protocol is a binary protocol (basically, it is snappy-compressed protobuf messages sent over HTTP).

Answer from valyala on Stack Overflow
🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › api
HTTP API | Prometheus
Enable the remote write receiver by setting --web.enable-remote-write-receiver. When enabled, the remote write receiver endpoint is /api/v1/write.
🌐
GitHub
github.com › prometheus-operator › prometheus-operator › issues › 4808
unable to configure remote_write endpoint (api/v1/write) TLS and client auth settings · Issue #4808 · prometheus-operator/prometheus-operator
May 23, 2022 - I inspected the remote_write spec at: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#remotewritespec · But this seems to imply that this instance will be doing the writing, not the reading of the incoming data. Is there something i'm missing here? ... can reach the api/v1/write endpoint fine via kubectl port-forward, but it complains if a GET is done to it instead of a POST, which makes sense/is expected.
Author: prometheus-operator
Discussions

go - 'remote write receiver' HTTP API request in Prometheus - Stack Overflow
Link : https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver · I am able to send a request to the endpoint ( POST /api/v1/write ) and can authenticate with the server. More on stackoverflow.com
🌐 stackoverflow.com
requestURI: /insert/1/prometheus/api/v1/write; cannot read compressed request in 6 seconds: unexpected EOF
Is your question request related to a specific component? vminsert version 1.108.0 Describe the question in detail This issue occurred after upgrading to version 1.108.0. It did not occur in versio... More on github.com
🌐 github.com
7
December 21, 2024
Proposal: expose `/api/v1/write` enpoint for remote_write storage API
Sometimes is is useful to have a single big Prometheus instance with all the data from other Prometheus instances located in different networks / datacenters. The most straightforward solution for this use case is to expose /api/v1/write endpoint for remote_write storage API on the big Prometheus ... More on github.com
🌐 github.com
15
October 22, 2018
Need some example of 'remote write receiver' HTTP API request in Prometheus
Link : https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver · I am able to send a request to the endpoint ( POST /api/v1/write ) , and can authenticate with the server. More on reddit.com
🌐 r/PrometheusMonitoring
1
0
June 1, 2022
🌐
VictoriaMetrics
docs.victoriametrics.com › victoriametrics › url-examples
VictoriaMetrics: API examples
Configure Prometheus or any other component that supports Prometheus Remote Write v1 protocol to send data to VictoriaMetrics via /api/v1/write path.
🌐
Grafana
grafana.com › docs › k6 › latest › results-output › real-time › prometheus-remote-write
Prometheus remote write | Grafana k6 documentation
K6_PROMETHEUS_RW_SERVER_URL=http://localhost:9090/api/v1/write \ K6_PROMETHEUS_RW_USERNAME=USERNAME \ K6_PROMETHEUS_RW_PASSWORD=PASSWORD \ k6 run -o experimental-prometheus-rw script.js
🌐
Elastic
elastic.co › elastic docs › manage data › the elasticsearch data store › data streams › time series data streams › advanced topics › prometheus remote write endpoint
Prometheus remote write endpoint | Elastic Docs
prometheus.remote_write "elasticsearch" { endpoint { url = "https://<es_endpoint>/_prometheus/api/v1/write" headers = { "Authorization" = "ApiKey <api_key>", } // basic_auth { // username = "<user>" // password = "<password>" // } } }
🌐
Prometheus
prometheus.io › docs › specs › prw › remote_write_spec
Prometheus Remote-Write 1.0 specification | Prometheus
func Send(WriteRequest) message WriteRequest { repeated TimeSeries timeseries = 1; // Cortex uses this field to determine the source of the write request. // We reserve it to avoid any compatibility issues. reserved 2; // Prometheus uses this field to send metadata, but this is // omitted from v1 of the spec as it is experimental.
Find elsewhere
🌐
Red Hat
developers.redhat.com › articles › 2023 › 11 › 30 › how-set-and-experiment-prometheus-remote-write
How to set up and experiment with Prometheus remote-write | Red Hat Developer
November 30, 2023 - remote_write: - url: "http://host.containers.internal:9090/api/v1/write" write_relabel_configs: # drop specific metrics from remote-write - source_labels: ['__name__'] regex: 'go_gc_.*' action: 'drop' # keep only specific labels for the kept metrics - regex: '__name__|instance|job|version|branch' action: 'labelkeep' - action: 'replace' target_label: 'source' replacement: 'writer-prometheus' - source_labels: - '__name__' - 'source' separator: ; regex: '(up);(writer-prometheus)' target_label: 'job' action: 'replace' replacement: '${2}-baz'
🌐
InfluxData
docs.influxdata.com › influxdb › v1 › supported_protocols › prometheus
Prometheus endpoints support in InfluxDB | InfluxDB OSS v1 Documentation
1 month ago - The URLs must be resolvable from your running Prometheus server and use the port on which InfluxDB is running (8086 by default). Also include the database name using the db= query parameter. remote_write: - url: "http://localhost:8086/api/v1/prom/write?db=prometheus" remote_read: - url: "http://localhost:8086/api/v1/prom/read?db=prometheus"
🌐
GitHub
github.com › prometheus › prometheus › issues › 4769
Proposal: expose `/api/v1/write` enpoint for remote_write storage API · Issue #4769 · prometheus/prometheus
October 22, 2018 - Sometimes is is useful to have a single big Prometheus instance with all the data from other Prometheus instances located in different networks / datacenters. The most straightforward solution for this use case is to expose /api/v1/write endpoint for remote_write storage API on the big Prometheus instance, so other instances could write to it using remote storage protocol.
Author: prometheus
🌐
Last9
last9.io › blog › prometheus-api
Prometheus HTTP API: Query and Manage Metrics (2026) | Last9
March 6, 2025 - Find out how Prometheus Remote Write works and when to use it for long-term storage: Read more. Even the most experienced DevOps engineers run into issues with the Prometheus API. Here are some traps to avoid: Complex queries over large time ranges can timeout faster than your morning coffee gets cold. Solution? Break them down: ... curl 'http://prometheus:9090/api/v1...
🌐
Google Groups
groups.google.com › g › prometheus-users › c › kCO2VGRiG68
How to push metrics to prometheus api/v1/write API endpoint with CURL
November 23, 2022 - The read and write protocols both use a snappy-compressed protocol buffer encoding over HTTP. ... curl --header "Content-Type: application/openmetrics-text" \ --header "Content-Encoding: snappy" \ --request POST \ --data-binary "@metrics.prom.sz" \ "http://localhost:9090/api/v1/write"
🌐
Vector
vector.dev › docs › reference › configuration › sinks › prometheus_remote_write
Prometheus remote write | Vector documentation
sinks: my_sink_id: type: prometheus_remote_write inputs: - my-source-or-transform-id compression: snappy default_namespace: service endpoint: https://localhost:8087/api/v1/write tenant_id: my-domain
🌐
SUSE
documentation.suse.com › cloudnative › suse-observability › latest › en › use › metrics › k8s-prometheus-remote-write.html
Prometheus remote_write | SUSE Observability Latest
July 10, 2025 - remote_write: - url: https://<tenant>.app.stackstate.io/receiver/prometheus/api/v1/write basic_auth: username: apikey password: <API Key>
🌐
Elastic
elastic.co › search-labs › blog › elasticsearch-native-prometheus-api
Elasticsearch Native Prometheus API Support | Elasticsearch Labs
May 10, 2026 - For ingestion, Elasticsearch also exposes the standard Prometheus Remote Write endpoint: POST /_prometheus/api/v1/write ingests time series via the Prometheus Remote Write v1 protocol.
🌐
Fluent Bit
docs.fluentbit.io › manual › data-pipeline › outputs › prometheus-remote-write
Prometheus remote write | Fluent Bit: Official Manual
March 31, 2026 - # Node Exporter Metrics + Prometheus ... tag: node_metrics scrape_interval: 2 outputs: - name: prometheus_remote_write match: node_metrics host: metric-api.newrelic.com port: 443 uri: /prometheus/v1/write?prometheus_server=YOUR_DATA_SOURCE_NAME header: 'Authorization Bearer ...
🌐
Medium
ambar-thecloudgarage.medium.com › remote-writes-with-kube-prometheus-3b4ad038d675
Remote writes with Kube Prometheus | by Ambar Hassani | Medium
June 30, 2024 - At my source end, which is a kube-prometheus-stack on the Kubernetes cluster, I specify the remote write URL along with a secret reference to the auth as shown below · prometheus: prometheusSpec: remoteWrite: - url: "http://<ip-of-the-above-docker-host>:9090/api/v1/write" basicAuth: username: name: <k8s-secret-name-holding-the-basic-auth-username> key: username password: name: <k8s-secret-name-holding-the-basic-auth-password> key: password
🌐
Reddit
reddit.com › r/prometheusmonitoring › need some example of 'remote write receiver' http api request in prometheus
r/PrometheusMonitoring on Reddit: Need some example of 'remote write receiver' HTTP API request in Prometheus
June 1, 2022 - Link : https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver · I am able to send a request to the endpoint ( POST /api/v1/write ) , and can authenticate with the server.