How do you isolate tenants' metrics in a shared Mimir or Thanos backend?
AdvancedProductionKubernetes & Multi-Cluster Observability
Answer
Mimir and Loki are multi-tenant via the X-Scope-OrgID header. Decide the tenant boundary (team, environment or cluster), then enforce it at write and read time:
- Write: each cluster's Prometheus or Alloy sends with its tenant header; for per-namespace tenancy, an Alloy or collector tier splits by namespace and sets the header.
- Read: Grafana data sources per tenant (or a gateway that maps the user's team to an OrgID), with folder permissions per team.
- Limits: per-tenant
ingestion_rate,max_global_series_per_user,max_fetched_series_per_queryin the runtime overrides file.
Cross-tenant queries (tenant1|tenant2 with tenant_federation enabled) are reserved for the platform team.
More on Kubernetes & Multi-Cluster Observability
Which `kube-prometheus-stack` values do you always change before going to production?IntermediateOn a managed control plane (EKS, GKE, AKS), which default components and rules do you turn off?IntermediateOne Prometheus per cluster or one central Prometheus scraping every cluster?AdvancedHow do you make sure every series can be traced back to its cluster and environment?BeginnerKarpenter replaces nodes every few hours. How do you keep monitoring cheap and useful?AdvancedHow do you use metrics to right-size requests and limits across the cluster?Intermediate