Skip to content

ELK Stack

In one line

The ELK Stack is a logging platform combining Elasticsearch (search), Logstash (collection), and Kibana (visualization).

In simple words

The ELK Stack is one of the most popular logging solutions. It consists of three open-source tools:

Elasticsearch — a distributed search and analytics engine that stores logs and lets you search them quickly. Logstash — a data processing pipeline that collects logs from various sources, transforms them, and sends them to Elasticsearch. Kibana — a visualization tool that lets you search, filter, and create dashboards from your logs.

A common addition is Beats (lightweight log shippers), making it the "ELK Stack" or sometimes "ELKB". The flow is: Beats collect logs → Logstash processes them → Elasticsearch stores them → Kibana visualizes them.

Example

bash
# Search for error logs in Kibana
# Query: level:error AND service:my-app

# Logstash config example
input { beats { port => 5044 } }
filter { json { source => "message" } }
output { elasticsearch { hosts => ["localhost:9200"] } }

Logstash receives logs from Beats on port 5044, parses JSON, and sends to Elasticsearch for storage and search.

How it works

  1. Beats or Logstash collect logs from your servers/containers.
  2. Logstash filters and transforms the log data.
  3. Elasticsearch stores the logs and indexes them for fast search.
  4. Kibana provides a UI to search, filter, and visualize the logs.

Common confusions

  • Confused with: EFK Stack

    The difference: ELK uses Logstash for collection; EFK replaces Logstash with Fluentd or Fluent Bit, which is more lightweight and Kubernetes-native.

Related terms

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary