Prometheus remote write to Grafana Mimir

Send Prometheus metrics to a Grafana Mimir cluster you run, with tenant headers, HA deduplication and rules set up before the first production write.

On this page

How Prometheus remote write to Grafana Mimir works

A single Prometheus server is a good fit until it stops keeping enough history or starts serving several teams that need separate data and query access. Sending Prometheus metrics to Grafana Mimir through remote write is the supported path for that step. Prometheus keeps doing what it already does: it scrapes targets, evaluates alert rules and sends alerts to Alertmanager. Mimir takes over the long-term copy of the samples and stores each tenant's series in its own Prometheus TSDB block storage in object storage. The key design point is that Prometheus remains the collector and alerting engine, and Mimir becomes the long-term store, not a replacement for either role.

The data path has two directions. Prometheus writes samples to the Mimir remote write API on the distributor, and each write carries a tenant ID header that Mimir uses to separate data by team or business unit. Reads go the other way: dashboards and PromQL queries are sent to the query frontend, which splits and caches them before they reach the query path. Mimir requires the tenant header on every HTTP request and leaves authentication and authorization to an external reverse proxy, so the proxy design is part of the build, not an afterthought. Confirm the current component names and routing in the Grafana Mimir architecture guide before you draw the network diagram.

Two facts shape the design. First, Prometheus local storage is not clustered or replicated and should be managed like any other single-node database, so Mimir does not make the local server highly available on its own. Second, Grafana Mimir is distributed under AGPL-3.0-only. Teams that modify Mimir or offer it as a network service should have legal review of their obligations before the rollout. Ask your legal or licensing team to confirm how that license applies to your planned use, and record the decision alongside the architecture.

What you need before connecting Prometheus to Mimir

Remote write to Mimir depends on four things lining up: a Prometheus release you can keep patched, a Mimir release you can keep upgrading, object storage that Mimir can write to, and an access layer that adds authentication and tenant headers. TLS ties the path together, so check each item in your own environment before the first sample is sent.

Prometheus version line

Choose between the current LTS line and the latest minor release. The LTS line receives bug fixes for one year, while a minor release generally stops receiving fixes after six weeks. Confirm the version your team can patch on schedule, and record which Prometheus build your remote write settings were tested against.

Current LTS line
3.13
Release cycle docs

Mimir release line

Pin a Grafana Mimir release on the 3.2 line, currently 3.2.2, and review the release notes before each upgrade. Mimir 3.0 changed the preferred ingest architecture to Kafka-based ingest, so confirm which architecture your deployment uses before you size anything. Your team will own every Mimir upgrade after go-live.

Mimir releases

Object storage backend

Mimir keeps each tenant's blocks in object storage, with S3, Google Cloud Storage, Azure Storage and OpenStack Swift supported. A local filesystem works only for single-node setups. Confirm the bucket, region, encryption, lifecycle rules and access keys with the team that owns storage, and ask who pays for stored and requested data.

Mimir architecture

Reverse proxy for authentication

Mimir requires a tenant ID header on every request and leaves authentication and authorization to an external component. Put a reverse proxy in front of the distributor and query frontend that validates each client, then sets or enforces the X-Scope-OrgID header. Test that a client cannot choose another tenant's ID by changing the header.

TLS certificates and trust

Prometheus supports TLS with client certificates, and its security model sets TLS 1.2 as the minimum. Plan certificates for the proxy endpoint, the internal Mimir paths and the Prometheus client, and define who renews them. Basic authentication without TLS sends credentials in cleartext, so do not skip this step on any network segment.

Prometheus security model

Deployment platform and sizing

Decide whether Mimir runs in monolithic mode or as separate microservices, typically on Kubernetes with the mimir-distributed Helm chart. The microservices layout adds components to patch, monitor and scale. Ask the platform team who operates the cluster, which node pools host Mimir, and what capacity they will reserve before the first remote write.

Configure remote write and verify the first samples

This sequence takes a Prometheus server from a running Mimir deployment to a verified stream of tenant-scoped samples, with a check after each step so problems surface before queues are tuned. It is written for platform engineers who will run the cluster and the Prometheus servers that feed it.

  1. Choose monolithic or microservices mode

    The platform team decides how Grafana Mimir will run before anything is installed. Mimir's components are microservices compiled into a single binary, and the -target parameter selects which components a process runs. Monolithic mode runs all components in one process, which suits a first evaluation or a small estate, while the microservices layout separates distributors, ingesters, queriers and the query frontend for independent scaling. Confirm the object storage backend you will use, since Mimir stores each tenant's series in object storage. The check for this step is a written decision record that names the mode, the storage backend and who owns the cluster.

  2. Deploy Mimir and confirm its readiness

    Start Mimir with the chosen -target settings, or install the mimir-distributed Helm chart if the cluster runs on Kubernetes. The chart is the supported route for installing, configuring and upgrading Mimir in a Kubernetes cluster, according to the Grafana Helm chart documentation. Point the configuration at the object storage bucket and confirm the write path components report ready on their health endpoints before continuing. The check for this step is that every write-path component is ready and the storage bucket accepts a test object written by the cluster.

  3. Expose the distributor behind an authenticating proxy

    Prometheus writes to Mimir through the remote write API on the distributor, and queries go to the query frontend. Mimir requires a tenant ID header on every HTTP request and leaves authentication and authorization to an external reverse proxy, so the proxy must be deployed in front of the distributor and query frontend before any team gets access. Authenticate Prometheus with TLS and credentials at the proxy, and make sure the proxy sets or passes the tenant header only for identities allowed to write to that tenant. Confirm the proxy is the only route to the distributor from outside the cluster. The check is an unauthenticated request being rejected and an authenticated write to the correct tenant being accepted.

  4. Add remote_write with the tenant header

    Add a remote_write block to the Prometheus configuration that points at the proxy's remote write endpoint and sends the tenant header for this Prometheus server's tenant. Store the credentials in a file or secret rather than inline in the configuration, and set TLS options to match the proxy's certificate chain. Reload Prometheus through its configuration reload path, using the lifecycle endpoint only if that endpoint was deliberately enabled for this server. Prometheus keeps its local storage, so scraping and alerting continue unchanged. The check is a clean configuration load in the Prometheus logs and no remote write errors reported by the proxy for that tenant.

  5. Confirm the first samples arrive in Mimir

    Query the Mimir query frontend through the proxy, using the same tenant header, and run a simple PromQL selector such as the up metric for the Prometheus job. Compare the returned series with the targets shown on the Prometheus targets page. Also query with a different tenant header and confirm the same series do not appear, which proves tenant isolation at the query path. Mimir's README says its multi-tenant architecture isolates data and queries from independent teams or business units. The check is that the expected series appear for the correct tenant, the count matches the Prometheus side, and the other tenant returns nothing for that data.

  6. Review remote write metrics before tuning

    Before changing any queue settings, read the remote write health metrics that Prometheus exposes on its own endpoint. Look for failed or retried sends, pending samples and any growth in the write backlog while the server is under normal scrape load. A stable, low error count on this baseline shows whether the default queue settings already keep up with this server's ingestion rate. Record the values so the tuning change can be compared with them. The check is a saved baseline with the send, failure and pending figures for the first working period.

  7. Tune queue settings against the baseline

    If the baseline shows samples falling behind or failing under load, adjust the queue settings in the remote_write block, such as the capacity and shard limits in queue_config, one change at a time. Each change raises memory use per shard, so make changes on a non-production Prometheus first where possible. Reload the configuration, let the server run through a comparable load period, and compare the pending and failure metrics with the baseline. The check is that pending samples return to a steady level and the failure count stays flat under the same scrape load, with the chosen values recorded alongside the sizing notes for this server.

Monolithic or microservices: choosing the Mimir deployment

Monolithic mode runs every Mimir component in one process. Mimir ships as a single binary compiled from microservices, and the -target parameter selects which components a process runs, so monolithic mode is the case where one process runs them all. This gives you one binary to deploy, one set of configuration, and one thing to restart and upgrade. It suits a smaller estate, a proof of concept, or a team that wants to learn the storage and query behavior before splitting it up. The trade-off is that read and write paths share CPU and memory, so a heavy query can affect ingestion, and you cannot scale the write path separately from the read path.

  • One process, one configuration: a single set of settings, one upgrade step, and one place to look when something fails.
  • Shared resources: query load and ingestion compete for the same memory, so limits must be set with both in mind.
  • Limited independent scaling: you cannot add query capacity without also adding write capacity.
  • Lower moving parts: fewer internal services to monitor, which lowers day-to-day operating effort.
  • Growth path: the same binary can later run component by component, so the choice is reversible with planning.

Before you choose this mode, confirm with your Mimir release notes which components the monolithic target includes and whether your expected series count and query load fit a single process.

Mapping Prometheus labels, tenants and rules to Mimir

This table maps each Prometheus-side and Mimir-side setting to the decision it controls, so you can see where tenant isolation, HA deduplication and rule evaluation happen. Read each row as a question to settle before the first remote write goes live. The main takeaway is that tenant IDs, replica labels and rule locations are hard to change later, so they should be designed with your teams before rollout.

SettingWhat it controlsDecision to makeWhat to confirm
X-Scope-OrgID tenant headerWhich tenant's TSDB receives and serves each request, since Mimir requires this header on every HTTP requestOne tenant per team, business unit or environment, set through remote write headers on each PrometheusHeader name and tenant limits in the Mimir configuration reference, and how your reverse proxy maps authenticated users to tenant IDs
Tenant mapping at the proxyMimir leaves authentication and authorization to an external reverse proxy, so the proxy decides which tenant a caller may write to or read fromWhether teams write directly with a fixed tenant or the proxy injects the header from SSO identityProxy behavior for header injection and stripping, and whether query access is restricted per tenant
External labelsIdentify the Prometheus server and its environment in every series sent upstreamA stable label set such as cluster and environment, applied identically across the fleetExternal label names used in your existing Prometheus configuration so series do not collide across sites
HA replica labelDistinguishes samples from the two Prometheus replicas in an HA pair so the receiving side can deduplicate themReplica label name and the cluster label that groups each pairDeduplication settings for HA pairs in the Mimir configuration reference, including the label names it expects
Recording rules locationWhether rules are evaluated in each Prometheus or by the Mimir ruler against tenant dataKeep rules local for site-scoped data, or move cross-site rules to the ruler for global seriesRuler configuration and rule storage options in the Mimir docs, and the effect on rule evaluation timing
Alerting rules locationWhere alert conditions are evaluated and where notifications are sent through AlertmanagerAlerting from Prometheus for site-level alerts, or from the Mimir ruler for tenant-wide alerts that need global dataAlertmanager endpoints per tenant and how alerts from the ruler reach your existing routing
Series label cardinalityHow many unique label combinations each tenant creates, which affects limits and cost of storageAgree label conventions with each team before they add high-cardinality labelsPer-tenant ingestion and series limits in the Mimir configuration reference and how to raise them

Securing the write path and tenant isolation

Remote write moves metrics across a network boundary and into a store that separates teams by tenant ID. The cards below cover where encryption, authentication and tenant enforcement sit, and which Prometheus settings widen or narrow exposure. Mimir does not authenticate requests itself, so the controls around the write path must be designed as one set.

TLS on the remote write endpoint

Terminate TLS in front of the Mimir distributor, and configure the tls_config block in remote_write so Prometheus verifies the server certificate against your internal CA. Prometheus supports TLS with TLS 1.2 as the minimum, so confirm the proxy and the client agree on protocol versions. Check that certificate rotation is scheduled and that Prometheus reloads the CA file when it changes.

Prometheus security model

Authentication at the reverse proxy

Mimir leaves authentication and authorization to an external reverse proxy, so that proxy decides which callers may write and which tenant IDs they may use. Prometheus can send basic authentication or client certificates to the proxy. Confirm that the proxy overwrites or strips any tenant header a client supplies, so a sender cannot write into another team's tenant.

Mimir architecture docs

Per-tenant read isolation

Tenant headers separate stored series, but read access is enforced by the same proxy layer in front of the query frontend. Map each Grafana data source or API client to one tenant or a documented set of tenants. Test with a credential for one team to confirm it cannot query another tenant's series, and keep that test in the retest list after upgrades.

Keeping admin APIs disabled

Prometheus admin HTTP APIs are disabled by default, and the --web.enable-admin-api flag enables destructive operations such as deleting series. The --web.enable-lifecycle flag enables reload and shutdown endpoints. Leave both off on the Prometheus servers that remote write, and confirm that the web listener is reachable only from approved networks.

Prometheus security model

Protecting credentials in remote_write

The basic_auth password or bearer token in remote_write is stored in the configuration file in cleartext unless you supply it from a file. Use password_file or bearer_token_file with restricted file permissions, and keep the file out of version control. Basic authentication without TLS exposes credentials in cleartext, so enforce HTTPS before adding any credential.

Rotating and auditing write credentials

Each Prometheus server, including HA pairs, needs its own write identity so one leaked credential can be revoked without stopping every sender. Ask your proxy and identity team how credentials are issued, rotated and logged. Confirm that proxy logs record the caller and tenant for each write, since Mimir itself does not provide that identity record.

Every write crosses the reverse proxy before reaching Mimir

The diagram starts at the scrape targets, which each Prometheus replica pulls from over HTTP. Both replicas send remote write requests through a reverse proxy, the trust boundary where authentication happens and where the tenant ID header that Mimir requires on every request is set. Behind the proxy, the distributor passes samples to ingesters in the classic architecture or to Kafka in the ingest storage architecture, and blocks end up in object storage. Grafana sends PromQL to the query frontend, which reads from the same store. Check that only the proxy can reach the distributor, and confirm which architecture your release uses.

Samples flow from scrape to storage, with queries reading back through the query frontend.

Common failures when Mimir receives Prometheus data

This table lists the failures teams most often hit when Prometheus writes to a Mimir cluster, with the likely cause and the check to run for each. Read it when remote write errors appear, series look duplicated, or queries return gaps. The main takeaway is that most failures trace back to headers, HA labels, queue capacity, object storage settings or the proxy in front of Mimir.

FailureLikely causeCheck to run
Writes rejected with a missing tenant errorThe remote write config has no X-Scope-OrgID header, or the header is set on a different receiver than the one Prometheus usesConfirm http_headers in the remote_write block sets X-Scope-OrgID, then send a test write and inspect the distributor response code
Writes accepted but data appears under the wrong tenantTenant ID is hardcoded per environment or changed by a proxy that rewrites headersQuery each tenant in Grafana and compare series counts; check the reverse proxy rules that set or strip the header
Duplicate series from an HA pairBoth Prometheus replicas send identical series without the replica and cluster labels that Mimir uses to deduplicateSet external labels for cluster and __replica__ on each server, enable HA tracking in the Mimir limits, and query a series to confirm only one copy is stored
Gaps or flapping series after failoverHA tracking is enabled but the cluster label is the same across unrelated Prometheus servers, or the replica label is missingCompare the label sets of the two replicas; each pair must share a cluster value and differ in replica value
Remote write queue falling behindQueue capacity is too low for the sample rate, the network to Mimir is slow, or Mimir returns retryable errors under loadWatch Prometheus remote write metrics for pending samples and retries, and check Mimir distributor and ingester health before raising queue limits
Out-of-order or too-old sample rejectionsSeries arrive after a newer sample was written, often after a long outage or a replica resyncRead the distributor error text, compare sample timestamps with the Mimir ingestion window limits, and confirm clocks are synchronized on Prometheus hosts
Store-gateway or compactor errors after writesObject storage bucket, region, endpoint or credentials are wrong, or the bucket policy blocks listing or deletionRun a manual list and write test against the bucket with the same credentials Mimir uses, and check the object storage section of the Mimir configuration
TLS handshake or certificate errorsThe certificate authority that signed the Mimir or proxy certificate is not trusted by Prometheus, or the certificate name does not match the URLSet ca_file in the remote write tls_config, verify the server name against the certificate, and test with the same CA bundle outside Prometheus
Writes fail only through the proxyThe reverse proxy caps request body size, times out large batches, or strips headers that Mimir requiresRaise body size and timeout limits on the proxy for the write path, and confirm the tenant header and content encoding reach the distributor unchanged
Queries return no data after a successful writeQuery path points at the distributor or a different tenant, or the query frontend cannot reach the queriersConfirm Grafana data source points at the query frontend with the same tenant header used for writes, and check querier connectivity

Questions buyers ask about Mimir and remote write

How much does it cost to run Grafana Mimir with Prometheus?

The Mimir project is open source, so the license fee is zero, and the cost comes from infrastructure, object storage, Kafka where your design uses it, and the people who run the cluster. Infrastructure and storage recur every month and grow with active series, retention and query load. Implementation effort is one-time, though upgrades and on-call work recur. When you ask for a quote, request a line-item breakdown: design and build, Helm chart or manifest delivery, migration of existing Prometheus data, load and failure testing, documentation, and ongoing support. Ask the vendor or your cloud provider to confirm current object storage and compute pricing for your region, since those figures are not part of this page.

How long does a Mimir remote write rollout take?

The duration depends on your scope and environment, so it should be agreed in writing before work starts. The main variables are how many Prometheus servers you send from, whether you need HA deduplication, whether you run Kafka-based ingest or the classic ingester architecture, how many tenants you configure, whether historical data must move, and how many approvals your change process requires. A rollout that starts with one tenant and one Prometheus pair takes far less time than a multi-tenant estate with rule migration and dashboard changes. Ask for a phased plan with exit criteria for each phase.

What does our team need to provide for a Mimir deployment?

You need a target Kubernetes cluster or equivalent infrastructure, object storage buckets with access credentials, network paths from Prometheus servers to the Mimir distributor and from Grafana to the query frontend, and a reverse proxy or gateway that handles authentication and sets tenant ID headers. You also need named owners for DNS, certificates, identity, secrets and on-call rotation. Confirm with your platform team which Kubernetes version and storage classes you run, and whether your Prometheus servers can reach the endpoints you plan to use.

Can our own team deploy and run Mimir without a partner?

Yes, if your team has Kubernetes, object storage and Prometheus experience and can staff an on-call rotation. Grafana publishes the mimir-distributed Helm chart for installing, configuring and upgrading Mimir in Kubernetes. The harder work is operational: sizing ingesters or the Kafka pipeline, tuning limits per tenant, managing compaction and retention, testing upgrades, and handling failure scenarios. Many teams run a pilot internally first, then decide which parts to hand to a partner. Ask a partner to separate the build from the ongoing run so you can compare costs honestly.

Does the AGPL-3.0-only license of Mimir affect how we use it?

Grafana Mimir is distributed under AGPL-3.0-only, which is a copyleft license with network-use terms. Whether those terms affect your organization depends on how you use, modify and offer the software, including whether users interact with a modified version over a network. Internal use without modification generally raises different questions than offering a modified Mimir as part of a service to customers. Have your counsel review the license text and your intended use before deployment, and record the decision. Note that Prometheus itself is Apache-2.0, so the two components are licensed differently.

Do we need Kafka to run Mimir?

Not always. Mimir's classic architecture uses stateful ingesters with local write-ahead logs. From Mimir 3.0, the preferred ingest storage architecture uses Kafka as a central pipeline that separates reads from writes. Choose based on your scale, failure tolerance, operating experience and existing Kafka capacity. If you already run Kafka reliably, the ingest storage design may fit. If you do not, adding Kafka is a significant operating commitment, and the classic design may be easier to run. Confirm the recommended option for your Mimir version in the architecture documentation before deciding.

How do HA Prometheus pairs send duplicate data to Mimir?

Two Prometheus servers scraping the same targets will both send samples, which creates duplicates. Mimir can deduplicate series from HA pairs using external labels that identify the replica and cluster, so only one replica's samples are kept per series. You must set these labels consistently on each Prometheus server and configure the Mimir HA tracker for the tenant. Test the setup by stopping one replica and confirming that queries show no gaps and no doubled values. Also confirm that alert rules run in only one place, so alerts do not fire twice.

How DeployOpen works on this

DeployOpen scopes, builds, tests and hands over Prometheus remote write to a self-hosted Grafana Mimir cluster inside infrastructure you control. Each engagement is fixed-scope, with the tenant model, HA pairing, rule placement and operating responsibilities agreed in writing before work starts.

How we scope

  • Map which Prometheus servers, jobs and tenants will send series to Mimir and which teams will query them.
  • Agree the tenant ID scheme and which reverse proxy handles authentication and authorization in front of Mimir.
  • Decide where recording and alerting rules run, and document the HA pair deduplication labels each server uses.

How we build

  • Configure remote write on each Prometheus server with the tenant header, TLS settings and queue limits agreed in scope.
  • Deploy the Mimir cluster with the chosen object storage backend and the target layout, then verify distributor and query frontend paths.
  • Test deduplication across an HA pair, query results in Grafana, and behavior when a Mimir component is restarted.

How we hand over

  • Deliver written configuration, Helm values or deployment files, and an inventory of tenants, retention settings and object storage buckets.
  • Provide runbooks for remote write lag, rule evaluation failures, tenant onboarding and Mimir upgrades, with the upgrade sequence written out.
  • Walk your operations team through dashboards and alerts that show ingestion, queue health and storage growth, and record the handover.

How we support

  • Ongoing support, version upgrades and continuous testing are available as a retainer after handover.
  • Upgrade planning covers Mimir release lines, Prometheus version changes and Helm chart updates, tested before production.
  • Confirm support boundaries, response expectations and the responsibilities of your team and ours in the written scope.

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.