Ravindra BagaleCourses & study guides मराठी

Chapter 95: Logging with Loki, Elastic Stack and CloudWatch

DevOps

95.3 The pipeline — agent, collector, storage and query

Story (fictional teaching scenario). At a fictional Nagpur company, Arjun and Chloe from Paris draw the route before installing an agent. They avoid collecting an entire shared machine by accident.

The pipeline — agent, collector, storage and query
The pipeline — agent, collector, storage and query

Why

A missing event can disappear at several boundaries; a pipeline diagram tells us where to check.

What

  • An agent reads selected data near the application.
  • A collector receives, transforms or forwards events; one program may play both roles.
  • A buffer temporarily holds events during a slowdown.
  • Backpressure means a slower downstream stage limits upstream progress.
  • A checkpoint remembers read position; storage retains data and the query layer searches it.

How

  1. Select only approved synthetic sources in a lab.

  2. Redact before the first durable or remote copy.

  3. Track input, rejected, queued and delivered counts.

  4. Set bounded buffering and an explicit overflow policy.

Example 1: Count each boundary

  1. Read the command or request.
Application emits 6 events
Collector accepts 6 events
Storage accepts 5 events
Query returns 5 events
  1. Read the result.

Output (illustrative; NOT executed against Loki, Elastic or CloudWatch)

Investigate the collector-to-storage boundary before rewriting the query.
  1. Line by line: These numbers are illustrative pipeline counters. Accepted by a collector is not proof of durable storage. A buffer that grows forever can exhaust disk, and dropping on overflow needs an explicit operational decision, not a hidden default.

Ravindra Bagale's Tip

An agent running is not proof that logs arrived.

Did you understand? Let us try it once more.