Problem
Logs scattered across ephemeral containers disappear when instances die and are impossible to search across services. Log bursts during incidents can also overwhelm the logging backend at the worst time.
Also known as: centralized-logging, log-shipping-pipeline
Collect, buffer, process, and index logs from all hosts into a central store so they can be searched during incidents.
Logs scattered across ephemeral containers disappear when instances die and are impossible to search across services. Log bursts during incidents can also overwhelm the logging backend at the worst time.
A log aggregation pipeline moves logs from where they are produced to where they can be queried. Its main jobs are durability (logs outlive the instance), uniformity (common fields), and protection of the backend from bursts.
app stdout -> node agent -> broker (Kafka) -> processors -> hot index
|-> object storage (archive)
processors: parse JSON, join multi-line, add k8s labels,
add trace_id, redact emails and tokens, sample debug
The agent tails container output and attaches metadata such as host, namespace, and pod. The broker decouples producers from the indexer: if the index is slow or down, logs queue instead of being lost. Processors normalize timestamps to UTC, enforce a schema, and tag each event with service name and environment. Tiered storage keeps recent logs fast to search and older logs cheap. Query access is audited, and field-level redaction happens before indexing, not after.
Operationally, track end-to-end lag, agent queue size, dropped events, and index rejection rate, and alert on them. Set per-service volume quotas so one noisy service cannot starve others.
High - storage, indexing, and brokers
High - capacity and schema management
Medium - many moving parts
Agent falls behind and drops logs during an incident
Unparsed multi-line stack traces split into many events
Secrets or personal data indexed and widely readable