Security

ELK Stack

How the ELK Stack works: Logstash collects and parses your logs, Elasticsearch stores and searches them, and Kibana turns them into charts and dashboards.

  • 7 min read
  • 5 questions
  • +35 XP
Transcript

ELK Stack, explained by cats. Kitty runs a big tuna shop. Hundreds of cats ordering. Hundreds of things happening every second. Something breaks. Kitty has no idea what went wrong. Or where. Or when. Kitty needs logs. Logs are records of everything that happens.

Every order. Every error. Every request. But logs are useless if Kitty can't read them. There are too many. Spread across too many places. Written in messy formats. So Kitty uses the ELK Stack. ELK stands for three things. Elasticsearch.

Logstash. and Kibana. First, Logstash. Logstash collects logs from everywhere. The shop. The kitchen. The delivery service. It cleans them up. Transforms them. Then sends them to one place. Next, Elasticsearch. Elasticsearch stores all those logs. And makes them searchable.

Instantly. Kitty types "show me all failed tuna orders from this morning." Elasticsearch finds them in milliseconds. Then, Kibana. Kibana is the dashboard. It turns all those logs into charts. Graphs. Visual patterns. Kitty can see spikes. Spot errors. Track trends.

All in one screen. Together, the three work like this. Something breaks in the shop? Kitty opens Kibana. Searches ELK Stack. Collect the logs. Store the logs. Understand the logs.