liveBook · Manning

EFK stack

As explained in Learn Docker in a Month of Lunches, Second Edition

The EFK stack is a logging architecture composed of Elasticsearch for storage and search, Fluentd for collection and processing, and Kibana for exploration and visualization.

The EFK stack centralizes container logging with three cooperating components: Fluentd collects and processes logs, Elasticsearch stores them as searchable documents, and Kibana provides exploration and visualization. Applications should write logs to stdout so the platform can collect, enrich, filter, and store them without coupling each application to one logging backend. section 19.3 section 19.5

A practical container logging flow looks like this:

  • Let Fluentd collect entries, add useful metadata such as component tags, and forward them to Elasticsearch. section 19.3
  • Store each entry as a document in Elasticsearch indexes, commonly using a daily collection such as fluentd-{date}. section 19.3
  • Use Kibana Discover to search text, filter by date or fields, inspect individual entries, and build log-count dashboards. section 19.3

Run a minimal logging path

Start Fluentd with its configuration, then launch a timecheck container using the Fluentd log driver. Generate application traffic and inspect the resulting documents in Kibana. For a multi-container application, assign tags such as gallery.access-log and gallery.image-gallery so Kibana can isolate logs by component instead of relying on container names or IDs.

The same pattern works beyond a single machine: Fluentd can run on each cluster node and forward collected logs to an Elasticsearch cluster. Although applications can write directly to Elasticsearch, keeping collection outside the application preserves the option to replace Elasticsearch with another backend such as Graylog or Loki. section 19.5

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Explains component roles, Docker configuration, metadata tagging, document storage, Kibana queries, and clustered deployment without detailing service internals.
Examples
Uses timecheck and image-gallery containers, Fluentd tags, Docker Compose commands, daily indexes, Kibana Discover, and log dashboards.
What it assumes
Assumes containerized applications and teaches the required stdout logging path, Fluentd driver configuration, and centralized collection model.
What you can do after
Operate Docker logging with Fluentd, inspect Elasticsearch documents in Kibana, filter component logs, and build operational dashboards.
How it connects
Connects Docker logging drivers, stdout, centralized logging, Elasticsearch, Fluentd, Kibana, Docker Compose, and Kubernetes.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.