# Prometheus Remote Write

### How It Works

The Prometheus Remote Write source creates a server that listens on:

* `http(s)://listen_address:listen_port/api/v1/write`

This source only accepts messages compatible with [v2](https://prometheus.io/docs/specs/prw/remote_write_spec_2_0/) of the Prometheus Remote Write protocol.

### Supported Platforms

| Platform | Metrics | Logs | Traces |
| -------- | ------- | ---- | ------ |
| Linux    | ✓       |      |        |
| Windows  | ✓       |      |        |
| macOS    | ✓       |      |        |

### Configuration Table

<table><thead><tr><th width="159.75">Parameter</th><th width="104.68359375">Type</th><th width="97.82421875">Default</th><th>Description</th></tr></thead><tbody><tr><td>listen_address</td><td><code>string</code></td><td>0.0.0.0</td><td>The IP address to listen on.</td></tr><tr><td>listen_port</td><td><code>int</code></td><td>9090</td><td>TCP port to receive Prometheus Remote Write requests.</td></tr><tr><td>enable_tls</td><td><code>bool</code></td><td>false</td><td>Whether or not to use TLS.</td></tr><tr><td>cert_file</td><td><code>string</code></td><td></td><td>Path to the TLS certificate file for the server.</td></tr><tr><td>key_file</td><td><code>string</code></td><td></td><td>Path to the TLS private key file for the server.</td></tr><tr><td>mutual_tls</td><td><code>bool</code></td><td>false</td><td>Whether or not to require client TLS authentication (mTLS).</td></tr><tr><td>ca_file</td><td><code>string</code></td><td></td><td>Path to the certificate authority file for authenticating client certificates.</td></tr><tr><td>include_metadata</td><td><code>bool</code></td><td>false</td><td>Propagates the incoming connection's metadata to downstream consumers.</td></tr><tr><td>enable_cors</td><td><code>bool</code></td><td>false</td><td>Enable Cross-Origin Resource Sharing support for HTTP requests.</td></tr><tr><td>cors_allowed_origins</td><td><code>strings</code></td><td><code>[]</code></td><td>A list of origins a cross-domain request can be executed from.</td></tr><tr><td>cors_allowed_headers</td><td><code>strings</code></td><td><code>[]</code></td><td>The allowed headers sets what headers will be allowed in CORS requests.</td></tr><tr><td>cors_max_age</td><td><code>int</code></td><td>0</td><td>Indicates how long (in seconds) the results of a preflight request can be cached.</td></tr></tbody></table>
