Interview Prep/Monitoring & Observability/Logging: Loki, Fluent Bit and Elasticsearch

Logs in Elasticsearch are 20 minutes behind real time

AdvancedTroubleshootingLogging: Loki, Fluent Bit and Elasticsearch
Answer

Likely causes → Queue backlog somewhere: agent buffer, Kafka consumer lag, Logstash pipeline workers saturated, or ES indexing slow.

Diagnose → Compare @timestamp vs ingest time (add an ingest pipeline set of event.ingested); check Kafka lag and _nodes/stats/indices/indexing.

Fix → Scale the bottleneck stage (pipeline workers, partitions/consumers, ES hot nodes), batch larger bulk requests.

Prevent → Alert on end-to-end lag (event.ingested - @timestamp).

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging: Loki, Fluent Bit and Elasticsearch