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 →

  1. Confirm the app still writes: kubectl logs deploy/api --tail=20.
  2. Check the node's shipper: kubectl -n monitoring logs ds/alloy on that node for errors like 429 or entry out of order.
  3. Check Loki for rate limiting: loki_discarded_samples_total by reason (e.g. rate_limited, per_stream_rate_limit, too_far_behind).
  4. Verify labels did not change (a renamed label means a new stream, so the old query shows nothing).
  5. 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.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging Pipelines