diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go
index 7e153bc329..4c59aa7b57 100644
--- a/cmd/prometheus/main.go
+++ b/cmd/prometheus/main.go
@@ -133,6 +133,10 @@ func (c *flagConfig) setFeatureListOptions(logger log.Logger) error {
switch o {
case "promql-at-modifier":
c.enablePromQLAtModifier = true
+ level.Info(logger).Log("msg", "Experimental promql-at-modifier enabled")
+ case "remote-write-receiver":
+ c.web.RemoteWriteReceiver = true
+ level.Info(logger).Log("msg", "Experimental remote-write-receiver enabled")
case "":
continue
default:
@@ -289,7 +293,7 @@ func main() {
a.Flag("query.max-samples", "Maximum number of samples a single query can load into memory. Note that queries will fail if they try to load more samples than this into memory, so this also limits the number of samples a query can return.").
Default("50000000").IntVar(&cfg.queryMaxSamples)
- a.Flag("enable-feature", "Comma separated feature names to enable. Valid options: 'promql-at-modifier' to enable the @ modifier. See https://prometheus.io/docs/prometheus/latest/disabled_features/ for more details.").
+ a.Flag("enable-feature", "Comma separated feature names to enable. Valid options: 'promql-at-modifier' to enable the @ modifier, 'remote-write-receiver' to enable remote write receiver. See https://prometheus.io/docs/prometheus/latest/disabled_features/ for more details.").
Default("").StringsVar(&cfg.featureList)
promlogflag.AddFlags(a, &cfg.promlogConfig)
diff --git a/docs/disabled_features.md b/docs/disabled_features.md
index 2af789311d..b579b38342 100644
--- a/docs/disabled_features.md
+++ b/docs/disabled_features.md
@@ -17,3 +17,9 @@ They may be enabled by default in future versions.
This feature lets you specify the evaluation time for instant vector selectors,
range vector selectors, and subqueries. More details can be found [here](querying/basics.md#@-modifier).
+
+## Remote Write Receiver
+
+`--enable-feature=remote-write-receiver`
+
+The remote write receiver allows Prometheus to accept remote write requests from other Prometheus servers. More details can be found [here](storage.md#overview).
diff --git a/docs/storage.md b/docs/storage.md
index f10b51a7e9..6e395724e4 100644
--- a/docs/storage.md
+++ b/docs/storage.md
@@ -88,7 +88,7 @@ needed_disk_space = retention_time_seconds * ingested_samples_per_second * bytes
To lower the rate of ingested samples, you can either reduce the number of time series you scrape (fewer targets or fewer series per target), or you can increase the scrape interval. However, reducing the number of series is likely more effective, due to compression of samples within a series.
-If your local storage becomes corrupted for whatever reason, the best
+If your local storage becomes corrupted for whatever reason, the best
strategy to address the problem is to shut down Prometheus then remove the
entire storage directory. You can also try removing individual block directories,
or the WAL directory to resolve the problem. Note that this means losing
@@ -111,9 +111,10 @@ a set of interfaces that allow integrating with remote storage systems.
### Overview
-Prometheus integrates with remote storage systems in two ways:
+Prometheus integrates with remote storage systems in three ways:
* Prometheus can write samples that it ingests to a remote URL in a standardized format.
+* Prometheus can receive samples from other Prometheus servers in a standardized format.
* Prometheus can read (back) sample data from a remote URL in a standardized format.

@@ -122,6 +123,8 @@ The read and write protocols both use a snappy-compressed protocol buffer encodi
For details on configuring remote storage integrations in Prometheus, see the [remote write](configuration/configuration.md#remote_write) and [remote read](configuration/configuration.md#remote_read) sections of the Prometheus configuration documentation.
+The built-in remote write receiver can be enabled by setting the `--enable-feature=remote-write-receiver` command line flag. When enabled, the remote write receiver endpoint is `/api/v1/write`.
+
For details on the request and response messages, see the [remote storage protocol buffer definitions](https://github.com/prometheus/prometheus/blob/master/prompb/remote.proto).
Note that on the read path, Prometheus only fetches raw series data for a set of label selectors and time ranges from the remote end. All PromQL evaluation on the raw data still happens in Prometheus itself. This means that remote read queries have some scalability limit, since all necessary data needs to be loaded into the querying Prometheus server first and then processed there. However, supporting fully distributed evaluation of PromQL was deemed infeasible for the time being.
@@ -138,7 +141,7 @@ If a user wants to create blocks into the TSDB from data that is in [OpenMetrics
A typical use case is to migrate metrics data from a different monitoring system or time-series database to Prometheus. To do so, the user must first convert the source data into [OpenMetrics](https://openmetrics.io/) format, which is the input format for the backfilling as described below.
-### Usage
+### Usage
Backfilling can be used via the Promtool command line. Promtool will write the blocks to a directory. By default this output directory is ./data/, you can change it by using the name of the desired output directory as an optional argument in the sub-command.
@@ -146,4 +149,4 @@ Backfilling can be used via the Promtool command line. Promtool will write the b
promtool tsdb create-blocks-from openmetrics [