ELK

ELK is short of Elasticsearch, Logstash and Kibana.

Elasticsearch

a real-time distributed searching and analyzing engine, which can be used to full-text search, structured search and analysis. Full-text search is based on Apache Lucene which is written by Java.

Features of Elasticsearch

  1. Real-time analysis
  2. Distributed file storing in real-time, taking each field as index
  3. Document-oriented, all objects are documents
  4. High availability, easy to scale, support cluster, sharding and replicas
  5. Friendly APIs, Supports JSON
  6. Zero-setting, automatically sharding
  7. RESTful style
  8. Based on Lucene and provides storage function

    Clusters

    Sharding and replicas

Logstash

a data collecting, filter and modifying engine in real-time, which is written by JRuby.

Features of Logstash

  1. Almost visit any data
  2. Binding with various external applications
  3. Supports resilient scale

Main components

  1. Shipper: send log data
  2. Broker: collect data, built-in Redis
  3. Indexer: data writes

Kibana

a open-source Apache protocol, which is written by JavaScript, to provide visualization function for Elasticsearch and Web platform.

Present data of other two components by HTTP protocols to users.

When to use?

use grep, awk as commands to analyze log directly, but it doesn’t convinent in large scale implement. Because we need to write a script for each machine and combine all results.(Low efficiency) Thus, we use ELK search info in one machine, and access by web application.

Advantages of ELK

  1. Developers can view log from web in detail
  2. help to collect log from each system, which distributes in a wide range

Deployment

L-E-K

Add Redis between L-E, which reduce pressure of server.

Replace Redis with Kafka as transactions is continuously increasing.

References

ELK
ELK Log
ELK
Best Log analysis tool