1 of 17

ELK Stack

2 of 17

  • Collection of Elasticsearch, Logstash, Kibana from Elastic

Search engines that scan and process the entire text in a document prior to indexing, are so-called full-text search engines. Lucene, which Elasticsearch and Solr are built on top of, is an example of a full-text search engine.

https://www.elastic.co/blog/found-indexing-for-beginners-part2/

3 of 17

Many Users

4 of 17

Elasticsearch

  • Easy to deploy (minimum configuration)
  • Scales vertically and horizontally
  • Easy to use API
  • Written in Java (beware of jvm heap, current support java 11)
  • Modules for most programming/scripting languages
  • Actively developed with good online documentation from its website
  • High availability
  • It’s free
  • Scoring…

5 of 17

Elasticsearch elements

  • Shards

• Single instance of Lucene on a node

• Can be primary or replica

  • Index
    • Mapping of shards to nodes
    • Like a database within a relational database
  • Nodes

• Keeps a copy of the index

    • Maintain primary and replica shards

https://www.elastic.co/blog/found-indexing-for-beginners-part1/

6 of 17

https://www.elastic.co/blog/found-indexing-for-beginners-part3

7 of 17

8 of 17

9 of 17

Terminologies

10 of 17

Installation type

  • Bare install
  • Docker
  • Kube

11 of 17

Various data sources

  • Kafka
  • Log
  • Api
  • CSV

12 of 17

Logstash

Log parsing

13 of 17

Grok

14 of 17

  • Example

15 of 17

Kibana

  • front end for visualizing dashboard for elasticsearch
  • Realtime search and index

http://localhost:5601

16 of 17

access1M.log

client_hostname.csv

17 of 17

Exercise –web log visualization

Given: A dump file contains web log data

  • Goal: Visualizations in Kibana
  • Use logstash to filter data
  • Create a dashboard with various visualizations
  • Example of visualization
    • Count only the number of GET /product/* by day
    • Count the frequency of accesses by types eg. Mozzila, chrome, android, etc.
    • Count the frequency of accesses by hostname

https://www.elastic.co/blog/importing-csv-and-log-data-into-elasticsearch-with-file-data-visualizer

https://www.bmc.com/blogs/elasticsearch-load-csv-logstash/