Logs from one service suddenly stop arriving in Loki, but the service is healthy. How do you trace the gap?
BeginnerScenarioLogging Pipelines
Answer
Situation read → Something broke between the container's stdout and the backend.
What I'd do →
- Confirm the app still writes:
kubectl logs deploy/api --tail=20. - Check the node's shipper:
kubectl -n monitoring logs ds/alloyon that node for errors like429orentry out of order. - Check Loki for rate limiting:
loki_discarded_samples_totalbyreason(e.g.rate_limited,per_stream_rate_limit,too_far_behind). - Verify labels did not change (a renamed label means a new stream, so the old query shows nothing).
- Add an alert: absence of logs for a critical service,
absent_over_time({app="api"}[15m]).
Why → Walk the pipeline hop by hop; each layer exposes its own metrics.
Interview tip → Monitor the logging pipeline like any other production service.
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