Grafana Mimir — Horizontally Scalable Prometheus Storage
Long-term metrics store for Prometheus and OpenTelemetry: multi-tenant, highly available, and queryable at a billion active series.
先审查再安装
这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。
npx -y tokrepo@latest install 6c28dae8-3919-11f1-9bc6-00163e2b0d79 --target codex先 dry-run,确认写入项后再运行此命令。
What it is
Grafana Mimir is a horizontally scalable, highly available long-term metrics store for Prometheus and OpenTelemetry. It can handle a billion active series with multi-tenant isolation. Mimir accepts remote-write from Prometheus instances and provides a PromQL-compatible query endpoint.
Mimir targets platform teams and SREs who need to retain Prometheus metrics beyond the local retention period. It solves the problem of scaling Prometheus storage across multiple clusters, teams, and data centers.
How it saves time or tokens
Prometheus stores metrics locally with limited retention. Mimir provides unlimited retention with object storage (S3, GCS, Azure Blob) at a fraction of the cost of local SSDs. Multi-tenancy means one Mimir cluster serves multiple teams without interference. The PromQL-compatible API means existing Grafana dashboards work without modification.
How to use
- Start Mimir in monolith mode for testing:
docker run -d --name mimir -p 9009:9009 \
-v $(pwd)/mimir.yaml:/etc/mimir.yaml \
grafana/mimir:latest -config.file=/etc/mimir.yaml
- Configure Prometheus to remote-write to Mimir:
# prometheus.yml
remote_write:
- url: http://mimir:9009/api/v1/push
headers:
X-Scope-OrgID: my-tenant
- Point Grafana to Mimir as a Prometheus data source at
http://mimir:9009/prometheus.
Example
# mimir.yaml - minimal configuration
target: all
common:
storage:
backend: filesystem
filesystem:
dir: /tmp/mimir-data
blocks_storage:
backend: filesystem
filesystem:
dir: /tmp/mimir-blocks
tsdb:
dir: /tmp/mimir-tsdb
server:
http_listen_port: 9009
multitenancy_enabled: false
Related on TokRepo
- Monitoring Tools — Observability and monitoring solutions
- DevOps Tools — Infrastructure and deployment tools
This tool integrates with standard development workflows and requires minimal configuration to get started. It is available as open-source software with documentation and community support through the official repository. The project follows semantic versioning for stable releases.
For teams evaluating this tool, the key advantage is reducing manual work in repetitive tasks. The automation provided by the built-in features means less custom code to maintain and fewer integration points to manage. This translates directly to lower maintenance costs and faster iteration cycles. The combination of cost-effective object storage, PromQL compatibility, and multi-tenant isolation makes Mimir a practical choice for organizations operating multiple Prometheus clusters that need centralized long-term metric retention.
Common pitfalls
- Monolith mode is for testing only; production deployments should use microservices mode with separate ingester, querier, and compactor components for reliability.
- Object storage configuration is critical; misconfigured bucket permissions cause silent data loss. Test write and read access before sending production metrics.
- Multi-tenancy requires setting the
X-Scope-OrgIDheader on every request; missing headers cause writes to be rejected.
常见问题
Both provide long-term Prometheus storage. Mimir is built by Grafana Labs with a focus on multi-tenancy and horizontal scalability. Thanos uses a sidecar approach alongside existing Prometheus instances. Mimir typically offers simpler operations for large-scale multi-tenant deployments.
Mimir supports Amazon S3, Google Cloud Storage, Azure Blob Storage, and S3-compatible stores like MinIO. Object storage provides cost-effective, durable retention for metrics data at scale.
Yes. Mimir exposes a PromQL-compatible query API. Existing Grafana dashboards and alerting rules work without modification when you switch the data source from Prometheus to Mimir.
Each tenant is identified by the X-Scope-OrgID header. Metrics, rules, and queries are isolated per tenant. Tenants share the same cluster infrastructure but cannot access each other's data.
Yes. Mimir is open-source under the AGPL-3.0 license. Grafana Labs offers Grafana Cloud with managed Mimir for teams that prefer not to operate their own cluster.
引用来源 (3)
- Grafana Mimir Documentation— Mimir provides horizontally scalable long-term storage for Prometheus metrics
- Grafana Mimir GitHub— Mimir is open-source under AGPL-3.0
- Mimir Multi-Tenancy Docs— Mimir supports multi-tenancy with X-Scope-OrgID isolation
讨论
相关资产
Grafana Loki — Prometheus-Inspired Log Aggregation System
Loki is a horizontally scalable, multi-tenant log aggregation system by Grafana Labs. Unlike other log systems, Loki indexes metadata about logs, not log content itself.
Cortex — Horizontally Scalable Long-Term Storage for Prometheus
Cortex is a CNCF project that provides horizontally scalable, highly available, multi-tenant, long-term storage for Prometheus metrics, letting you run Prometheus-as-a-Service at scale.
Grafana Tempo — Massively Scalable Distributed Tracing Backend
Grafana Tempo is a high-volume, minimal-dependency distributed tracing backend that ingests OpenTelemetry, Jaeger, and Zipkin spans into cheap object storage and integrates natively with Grafana for trace exploration.
Grafana Alloy — OpenTelemetry Collector Distribution by Grafana
Collect, transform, and ship telemetry data with Grafana Alloy. A vendor-neutral OpenTelemetry collector with a programmable pipeline, built-in Prometheus scraping, and native Loki and Tempo support.