Using a central Prometheus as a remote write receiver

A central Prometheus can accept samples pushed from agent-mode servers at edge sites once the remote write receiver is enabled and protected. This page covers the setup, the trade-offs, and the point where Thanos or Mimir fits better.

On this page

Using a central Prometheus as a remote write receiver for edge sites

Several edge sites running Prometheus in agent mode need one central place to query and alert across all of them. The remote write receiver is off by default and is enabled on the central server with the --web.enable-remote-write-receiver flag, so the first change on the central Prometheus is a deliberate startup option, not a default. In this pattern, each edge server scrapes its local targets, keeps no long-term data of its own, and forwards samples over the remote write protocol to a central Prometheus that stores them in its local time series database and serves PromQL queries and alerting rules from one place. The edge servers do the collection, the central server does the querying and alerting, and the sites stay independent of one another while the central team gets a single view.

Teams choose this over federation when they need every raw series centrally, not a selected subset, and when the edge sites are too far away or too numerous to scrape directly from the center. Federation pulls series from one server to another on a schedule and is better suited to aggregated, pre-selected data. Teams choose a dedicated long-term storage product when retention, volume or high availability exceed what a single central server can hold, because the storage docs describe local storage as not clustered or replicated and to be managed like any other single-node database. Before committing, confirm with your own team how much data each site produces, how long the central server must keep it, and how the central host will be backed up and restarted, since a single receiving server becomes the one point where all edge data lands.

How edge agents push samples to a central receiver

The diagram starts at edge site networks, where agent-mode Prometheus servers scrape local targets and keep no long-term history of their own. Each agent sends samples over TLS across the trust boundary to the receiver endpoint on the central Prometheus, which must be enabled with --web.enable-remote-write-receiver. The central server stores those samples alongside its own scrapes and sends alerts to Alertmanager. Check the boundary crossing first, since it is the only path that leaves a site.

Edge agents remote write across the trust boundary into the central Prometheus.

Which configuration options fit which edge pattern

The remote write receiver is off by default, so the central server needs the flag --web.enable-remote-write-receiver before it accepts pushed samples. This is the first decision because it adds a write path to the server's HTTP port. Anyone who can reach that port can send data, so the flag should only be enabled alongside the network and access controls you have planned.

  • Flag placement: Add the flag to the startup command in your service definition. Confirm the exact syntax for your version in the Prometheus command-line flags reference.
  • Scraping continues: Enabling the endpoint does not change how the central server scrapes its own targets.
  • Network reachability: Restrict the port to edge site addresses with firewall rules or a reverse proxy.
  • Admin endpoints: Keep --web.enable-admin-api and --web.enable-lifecycle off unless you need them, since the security model says both are disabled by default.

Check that the flag appears in the running process and that requests from outside your edge networks are refused.

Setting up the receiver and the edge senders

This sequence turns a central Prometheus into a protected remote write receiver and connects agent-mode servers at edge sites to it, with a check after each step so the team knows the data path works before relying on it.

  1. Confirm the Prometheus version and release line

    The platform team checks which Prometheus version the central server and each edge agent run, and confirms that both sit on a release line that still receives bug fixes. Minor releases only receive fixes for a limited period, so an unsupported minor version on the central server is a risk for the whole collection path. Use the release cycle page and the GitHub releases list to confirm the current long-term support line and its end-of-life date before choosing a version. Check the result: every server reports a version on a supported line, and the team has written down the chosen version for both sides.

  2. Enable the remote write receiver flag

    On the central server, the platform team adds the flag --web.enable-remote-write-receiver to the startup command or service unit, then restarts Prometheus. The endpoint is off by default, so nothing accepts pushed samples until this change is made. Keep the change in the same configuration management system as the rest of the server, so that a rebuild does not silently remove it. Check the result: the server starts cleanly, and a test request to the write endpoint from a trusted host returns a response that is not a not-found error.

  3. Place TLS and authentication in front of the endpoint

    Before any edge site connects, the security or platform team puts the write endpoint behind TLS and an authentication mechanism. Prometheus supports TLS with client certificates and HTTP basic authentication, but basic authentication without TLS sends credentials in cleartext, so TLS comes first. Many teams place an authenticating reverse proxy in front of the endpoint and restrict source addresses to the edge networks. Confirm that the admin APIs stay disabled unless there is a documented need. Check the result: an unauthenticated request is rejected, a request with valid credentials or a valid client certificate succeeds, and a plain HTTP request is refused or redirected.

  4. Configure remote write on each agent-mode server

    On each edge server running in agent mode, the operator adds a remote_write block to the configuration file that points at the central endpoint's URL. The block carries the TLS settings, the client certificate or the basic authentication credentials, and any write relabeling rules that drop series the central server does not need. Store credentials in files with restricted permissions rather than inline in version-controlled configuration. Reload or restart the agent, then check its logs for successful sends and for any errors about certificates or authentication. Check the result: the agent logs successful writes and its remote write metrics show samples being sent without persistent failures.

  5. Verify that samples arrive at the central server

    The platform team runs a PromQL query on the central server for a series that originates only at one edge site, filtered by a site or instance label that the edge configuration adds. The series should appear within the time the agent takes to flush its first batch, and its timestamps should move forward as new samples arrive. Repeat the check for each edge site so that no site is silently missing. If the series does not appear, check the agent's remote write failure metrics, the central server's logs and the authentication path before changing anything else. Check the result: each edge site has a current series visible on the central server and the team has recorded the query used.

  6. Confirm retention covers the edge data

    The platform team checks the central server's retention settings against how long the edge data must be kept for investigations, reporting and any evidence requirement the organization has set. Prometheus defaults to 15 days of retention, configurable by time or size, and the central server's disk must hold the data from all edge sites across that period. Ask the storage owner to confirm the disk capacity and whether a size limit could cut data before the time limit is reached. Check the result: the team can query an edge series for a date at the far end of the retention window, and the chosen retention and disk capacity are written down with the owner's name against them.

  7. Review the path before adding more sites

    Before adding more edge sites, the team reviews the first working path end to end: the flag, the endpoint protection, the agent configuration, the sample checks and the retention figures. The review confirms that the failure metrics on each agent are visible to whoever watches the central server, so that a broken path is noticed. It also confirms that credentials and certificates have an owner and a renewal process. Check the result: the review is signed off by the platform and security owners, and the team has a runbook entry that names the endpoint, the sites and the verification queries.

Protecting the receiver endpoint

The remote write receiver accepts data from every edge site, so anyone who can reach it can write samples into your central store. The controls below work together: encryption and client identity at the transport layer, credentials and disabled admin endpoints at the application layer, and segmentation and a proxy at the network layer.

TLS with client certificates

Terminate TLS on the receiver and require client certificates so that only known edge Prometheus servers can complete a connection. Prometheus supports TLS with a minimum of TLS 1.2, so set that floor explicitly in the web configuration file and confirm that every edge sender presents a certificate signed by the CA you trust. Plan how certificates are issued, rotated and revoked for each site before the first sender is switched on, since expired certificates will silently stop data from arriving.

Security model docs

Basic authentication with bcrypt

If client certificates are not practical for a site, HTTP basic authentication is available, and the password must be stored as a bcrypt hash in the web configuration file rather than in plain text. Basic authentication must never run without TLS, because the credentials would travel in cleartext on every request. Ask who owns each credential, how it is rotated, and whether senders at different sites use separate accounts so one leaked password does not open the whole endpoint.

Admin and lifecycle endpoints off

Keep the admin APIs disabled, which is the default, and do not add --web.enable-admin-api or --web.enable-lifecycle to the receiver's startup flags. The admin API enables destructive operations such as deleting series, and the lifecycle flag enables reload and shutdown over HTTP. Enabling the remote write receiver with --web.enable-remote-write-receiver does not require either flag, so review the full startup command during the build to confirm they are absent.

Command-line flags

Network segmentation between sites

Place the receiver on a network segment that only edge senders and the core operations team can reach, and allow inbound traffic on its listening port from the specific edge address ranges rather than from anywhere. Keep the edge sites on separate routes so that a compromised branch cannot reach other sites' management interfaces. Confirm the firewall rules with a test from a non-approved host, and document which team owns each rule, since edge connectivity is where receiver outages usually begin.

Reverse proxy for single sign-on

Prometheus has no built-in single sign-on, and its security model notes there is no built-in CSRF protection on mutating endpoints. If operators need to reach the web UI or API through corporate identity, place an authenticating reverse proxy in front of it and keep the receiver's write path reachable only through the certificate or credential checks described above. Confirm that the proxy does not break the write endpoint for senders, and test the proxy's behavior on large compressed request bodies before go-live.

Security model docs

Exporters that take URL parameters

Where the same central Prometheus also runs exporters such as SNMP or Blackbox, remember that these take targets from URL parameters, so anyone with HTTP access to them can make them send requests to arbitrary endpoints. Keep exporters bound to localhost or the internal scrape network, and never expose them on the receiver's edge-facing interface. Ask your team to confirm which exporters run on the central host and which network each one can reach.

How out-of-order samples from edge agents affect the central server

Edge sites buffer and send late data after a network outage, so samples from a single series can reach the central server out of time order. Agent-mode Prometheus servers at edge sites keep writing to their local write-ahead log while the link to the central server is down, then replay that backlog through remote write once connectivity returns. The central server receives a mix of fresh samples and samples that are minutes or hours older than the newest data it already holds for the same series. Whether those older samples are stored, dropped or rejected depends on the out-of-order ingestion settings in your version of Prometheus, and the reader must confirm those settings before relying on any behavior. Check the out-of-order time window option in the configuration for the version you run, and confirm in the current storage and remote write documentation how the receiver treats samples outside that window.

The symptoms are easy to miss because they look like ordinary network noise. Rejected samples show up as errors on the sending side and as gaps in the receiver's counters, so the edge agent's remote write failure metrics and the central server's ingestion metrics should be compared after each test. Gaps in graphs appear where the window was too narrow, and rate or increase queries over the recovery period can produce spikes or dips that do not reflect what happened at the edge. The most serious risk is a misleading alert: an alerting rule evaluated on the central server during backlog replay may see stale or partial data and fire, or stay silent, for a site that was in fact healthy or failing. Review every alert rule that depends on data from edge sites for this behavior.

Test this before production traffic depends on it. Simulate an outage by blocking the network path between one edge agent and the receiver for a known period, restore it, and then compare what the edge agent sent with what the central server stored, using queries for a known counter and a known gauge. Repeat the test with the window setting you plan to ship, and record what the alert rules did during replay. Ask your platform team, or the partner you engage, to write down the window values, the expected rejection behavior and the alert review outcome so that the design can be reviewed by your security and operations stakeholders.

Limits to confirm before standardizing on this pattern

A central Prometheus receiving remote writes from edge agents is simple to start, but it concentrates storage, write load and reliability risk on one server. The cards below list the limits to confirm in your own environment before you make this the standard pattern across sites.

Single server storage

Local storage is not clustered or replicated, so the central Prometheus is a single point of failure unless you pair it with a second receiver, shared storage plan or a long-term store built for replication. Confirm who owns recovery when this server fails, how long a site can buffer samples at the edge while it is down, and whether your alerting still works during an outage at the centre.

Storage docs

Write load on the receiver

Every edge agent adds its samples to the same ingestion path on the central server, so the receiver's CPU, memory and disk all grow with the number of sites and series. Measure the combined sample rate from all sites against the capacity of one server before you add the next site, and set a documented ceiling that triggers a planned split.

Edge queue and sharding tuning

Agent-mode servers at the edge hold samples in queues while the link or the receiver is slow, and a poorly sized queue either drops data or falls behind. Confirm the queue capacity and shard settings on each edge server, the WAN bandwidth between sites, and the alerts that show pending samples growing before a backlog becomes data loss.

Out-of-order sample handling

Samples from several edge servers that arrive late or out of sequence can be rejected or mis-ordered at the central server, depending on the version and configuration you run. Test a site that loses its link for an extended period, then confirm the gaps and reordering appear in your dashboards exactly as expected before you rely on the pattern for capacity reports.

Reliability over precision

Prometheus documentation says the project values reliability over precision and is not suitable where 100% accuracy is required, such as per-request billing. Decide which metrics in your estate can tolerate gaps or delayed samples, and keep any compliance or billing evidence on a system designed for exact records.

Overview docs

Receiver endpoint exposure

The remote write receiver is off by default and is turned on with a single command-line flag, which means it is easy to enable without a review. Confirm that only the edge sites can reach the endpoint, that TLS and client authentication are in place, and that the change is tracked in your configuration management.

Command-line flags

Questions buyers ask about remote write receivers

Can our team run a central Prometheus receiver without outside help?

Yes, if you already operate Prometheus and have someone who owns its configuration, certificates and upgrades. The receiver is a flag on the same binary (--web.enable-remote-write-receiver), so the new skills are mostly network design, TLS for edge senders, and watching the central server's disk and memory. Teams with no Prometheus operations experience should first check whether they can own the single-node storage model, since the Prometheus storage docs state that local storage is not clustered or replicated. Ask a partner to review your skill gaps against that list before you decide.

What makes a remote write receiver project bigger or smaller?

The main drivers are the number of edge sites, the number of active series each agent sends, how long you keep data centrally, the quality of each WAN link, and whether the receiver must survive a node failure. More sites and series raise disk and memory on the central server. Long retention multiplies disk use. Unreliable links increase out-of-order samples and retry load. Each driver changes the design, so the written scope should list them with your current numbers.

How long does setup take for a receiver?

Duration depends on scope: how many sites send data, whether TLS and authentication are added at the edge, how much dashboard and alert rule migration is included, and how much of the network path needs approval. No fixed duration applies to every environment. A quote should break the timeline into design, build, edge rollout, validation, and handover, with the change approvals you need named explicitly. Ask for those milestones in writing.

When is a receiver enough, and when do we need Thanos or Mimir?

A receiver fits when one central server can hold the combined data for your retention target, when one team runs all queries and alerts, and when a short outage of the central node is acceptable. Move toward Thanos or Grafana Mimir when you need highly available storage, long retention on object storage, or a global query view across many replicas. Thanos and Mimir are separate projects with their own operating models, so plan for them as a second design decision rather than a default upgrade.

How do we secure the receiver endpoint against unknown senders?

Place the endpoint behind TLS with client certificate authentication, since the security model supports TLS 1.2 as a minimum and client certificates. Keep HTTP basic authentication only on top of TLS, because without TLS the credentials travel in cleartext. Keep the admin APIs disabled unless you have a reason to enable them. Restrict which networks can reach the port with firewall rules. Confirm these controls with your own security team against your threat model before go-live.

What recurring work follows go-live?

Expect recurring work in four areas: Prometheus upgrades on the six-week minor release cycle or on a chosen long-term support line, certificate rotation for edge senders and the receiver, capacity reviews of disk, memory and series counts as sites are added, and periodic checks that remote write queues are not falling behind. Ask whether the scope includes these as a retainer, as scheduled work, or as handover to your team, and what each option costs in your environment.

What happens to data when the WAN link drops?

Edge agents buffer samples in their write-ahead log and retry when the link returns, so short outages usually leave gaps filled later. Late samples can arrive out of order, and the central server must be configured to accept them within its time window. Samples older than that window can be rejected. Engineers should test a controlled link outage at each site type and confirm the out-of-order settings and the retry behavior with the version you run.

When to move to Thanos or Grafana Mimir instead

The remote write receiver works while one central Prometheus can hold everything you need to query, keep and alert on. Plan the move to a dedicated long-term store when one central server stops being the right place for the data. The clearest signals are queries that must span many HA pairs or edge sites in one view, retention that exceeds what one local disk can hold safely, a requirement that samples live in object storage, separate tenants whose data must be isolated, or a need for the storage layer itself to survive the loss of a node. Local storage is not clustered or replicated, so none of the last three are things the receiver can provide on its own.

The two sibling topics cover the two most common destinations. Thanos keeps Prometheus as the scraping and rule-evaluating component and adds a sidecar that uploads blocks to object storage, a Querier for a global view across HA pairs, and a Store Gateway and Compactor for older data and downsampling. Its operating effort is spread across several components that you must size and upgrade together. Grafana Mimir is a self-hosted, horizontally scalable store that accepts remote write and handles multi-tenancy, deduplication of HA pairs and rules centrally. Its operating effort is the highest of the two because it runs as a microservices deployment that needs its own capacity planning and object storage. Confirm the current component list and deployment modes in each project's documentation before you choose.

Before you migrate, measure what the central server is actually doing. Check how many active series it holds, how much disk the retention you need would consume, and whether query latency is already a problem. Ask your team which of the signals above apply today and which are only expected in the next year. If only one or two apply, a larger central server with a planned retention limit may still be enough. If several apply, plan the migration as a project with a dual-write period, so that the receiver and the new store run side by side until dashboards and alerts are verified against the new store.

How DeployOpen works on this

DeployOpen scopes a central Prometheus receiver as a written, fixed-scope engagement inside your infrastructure, covering the endpoint, its protection, edge sender configuration and the ingestion limits that matter. The work ends with a documented receiver your team can operate, with a clear point to decide whether Thanos or Mimir fits better.

How we scope

  • Inventory the edge sites, agent-mode senders and the series volume each one forwards to the central server.
  • Confirm the network path, TLS and authentication requirements for the receiver endpoint before any configuration changes.
  • Agree in writing which sites, senders, alert rules and out-of-order handling are in scope, and what is excluded.

How we build

  • Enable the receiver with the --web.enable-remote-write-receiver flag and place it behind TLS and authentication you control.
  • Configure each edge sender's remote write target, labels and retry behavior, then verify samples arrive in the central server.
  • Test out-of-order sample handling and the effect of retention and disk sizing on the central server using your own sample volumes.

How we hand over

  • Deliver the receiver configuration, sender configuration and access model as documented, version-controlled files.
  • Provide a runbook covering sender onboarding, certificate rotation, disk growth checks and the criteria for moving to Thanos or Mimir.
  • Walk your operations team through ingestion dashboards, alerts on the receiver itself and the restore steps for its data directory.

How we support

  • Ongoing support, version upgrades and continuous testing of the receiver are available as a retainer.
  • Retest the endpoint's protection and sender configuration after Prometheus upgrades or changes to the network path.
  • Confirm with your team which Prometheus release line you will run before the build starts, using the project's published release cycle.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.