RousselTMLEARNING

TP · Grafana Mimir: from discovery to expertise

Lab: Monolithic Mimir with MinIO, Prometheus and Grafana

What you will learn in this TP
  • Configure Mimir with object storage
  • Connect Prometheus via remote_write
  • Query Mimir from Grafana

Introduction #

What you will learn in this section
  • Configure Mimir with object storage
  • Connect Prometheus via remote_write
  • Query Mimir from Grafana

Context. Your team wants to centralise the metrics from several Prometheus servers and keep them for a year. Before sizing a cluster, you build a complete prototype on your workstation.

Prerequisites: Docker Compose, basic knowledge of Prometheus and PromQL  ·  Estimated time: 45 min

A first remote_write → Mimir → Grafana pipeline.

Setup #

Guided steps, with their solutions.

  1. 1. Write mimir.yaml

    Why? Mimir needs to know where to store blocks, rules and the alerting configuration; in monolithic mode with a single process, the replication factor must be lowered to 1.

    Write the Mimir configuration: S3 storage pointing to MinIO, three separate buckets, multi-tenancy disabled and replication set to 1.
  2. 2. Connect Prometheus

    Why? Prometheus keeps its role as the collector; Mimir is the one that stores and serves the history.

    Write a prometheus.yml that scrapes Prometheus itself and Mimir (mimir:8080), with an external label cluster and a remote_write to Mimir.
  3. 3. Start the stack

    Why? A reproducible Compose file lets you restart the lab from scratch at any time.

    Write the docker-compose.yml (MinIO, Mimir, Prometheus, Grafana), start it and wait until Mimir is ready.
  4. 4. Check ingestion

    Why? Before opening Grafana, make sure the samples are actually arriving and are not being rejected.

    Query the Mimir Prometheus API to count the series of the mimir job, then check that no sample has been rejected.
  5. 5. Add the data source in Grafana

    Why? For Grafana, Mimir is just another Prometheus data source: only the /prometheus prefix changes.

    Create a Prometheus-type data source pointing to Mimir and plot rate(cortex_distributor_received_samples_total[1m]).
  6. 6. See the blocks in MinIO

    Why? The first block is only uploaded once a 2-hour period closes: it is normal not to see anything straight away.

    Open the MinIO console (localhost:9001) or use mc to list the blocks bucket after two hours.

Difficulty level : ●●○○○ (2/5)

My progress

  • ⏱ Estimated time : ≈ 45 min

Sign in to track your progress and take notes. Sign in

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Recommended Articles

Why Grafana Mimir? Architecture and deployment modes

The limits of Prometheus alone, what Mimir brings (long-term storage, high availability, multi-te...

Mimir: the write path (distributor, ingesters, replication and HA deduplication)

How Mimir ingests metrics: remote_write, distributor validation and limits, hash ring, ingester r...

Thanos, Grafana Mimir or VictoriaMetrics: which long-term storage for Prometheus?

Detailed comparison of three long-term storage solutions for Prometheus: architecture, storage, h...

The LGTM stack (Loki, Grafana, Tempo, Mimir): architecture and setup

Understand Grafana Labs' LGTM stack: Loki for logs, Grafana for visualization, Tempo for traces a...

Mimir: compactor, retention and object storage

Configure Mimir object storage (S3, GCS, Azure, MinIO), understand compaction and split-and-merge...

Mimir: ruler, Alertmanager and mimirtool

Evaluate recording and alerting rules in Mimir, configure the multi-tenant Alertmanager and autom...

Grafana Mimir best practices: architecture, limits, costs and operations

Production checklist for Grafana Mimir: architecture, zone-aware replication, per-tenant limits, ...

Mimir: the read path (query-frontend, querier, store-gateway and caches)

How Mimir answers a PromQL query: query-frontend splitting and caching, queue, queriers, store-ga...

Grafana Pyroscope architecture and deployment

Pyroscope components (distributor, ingester, querier, store-gateway, compactor), object storage, ...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!