Each team wants its own log index, retention and access. How do you implement multi-tenancy?
IntermediateScenarioLogging Pipelines
Answer
Situation read → Shared backend, separate data boundaries, different retention needs.
What I'd do →
- In Loki, enable
auth_enabled: trueand set theX-Scope-OrgIDtenant header per team at the gateway or shipper. - Configure per-tenant limits and retention in
runtime_configoverrides (retention_period,ingestion_rate_mb). - In Grafana, create a data source per tenant and map it to a team with permissions.
- In Elasticsearch/OpenSearch, use index patterns per team and role-based access with document-level security if needed.
Why → Tenant isolation prevents one noisy team from hurting others and keeps data access least-privilege.
Interview tip → Mention per-tenant rate limits as the main defence against noisy neighbours.
More on Logging Pipelines
Developers SSH into servers and `grep` log files to debug. You are asked to centralise logging. Where do you start?BeginnerYour app writes free-text logs like `User 42 paid 19.99 in 340ms`. Why push for structured logging, and how?BeginnerLoki ingestion is failing with `stream limit exceeded` and the ingester memory is exploding. What happened?IntermediateFluent Bit pods on busy nodes are dropping logs during traffic spikes. How do you make the pipeline lossless?IntermediateThe Elasticsearch cluster for logs goes red every Monday after the weekend batch jobs. How do you stabilise it?AdvancedFinance says the log bill doubled in a quarter. How do you cut it without losing debugging ability?Intermediate