SlideShare a Scribd company logo
Kibana + ElasticSearch + LogStash
By Dmitriy Mustafin
JavaMeetup
handle Log messages on Prod servers
My experience
- I started with machine code and punched cards. I used to write on
Assembler, then on C and Pascal, С++, Delphi, C#, Javascript, and
some other scripting languages. Now I mostly write on Java, and I’m
pretty much happy with that.
- DOS (it was a wonderful to have 21h interrupt), OS/2, QNX,
Windows (my favorite so far), Linux (and Yocto as well), MacOS/iOS.
- I studied at university but I still haven't defended my thesis (and I'm
not planning on doing this anytime soon). I keep learning new things
during my work.
- I was writing, designing, engineering, managing and solving
problems.
- Married, children, cat.
HYS Enterprise is a Dutch software
development company with more than
200 talented engineers
from all over the world
hys-enterprise.com
Agenda
● What is log and what’s this for?
● How can we do log totally senseless?
● Logging levels or how not to drown in gigs of data
● Most popular logging processors
● Elastic Stack as a result of smoking in the Netherlands
● This beautiful Kibana
● This nimble and gluttonous ElasticSearch
● This terrifying LogStash
● LogStash: real-life example (or even live demo)
● How can we avoid pitfalls of LogStash?
● ElasticBeats or “What else do you want from me?”
What is log and what’s
this for?
In computing, a log file is a file that records either events
that occur in an operating system or other software runs,
or messages between different users of a communication
software.
Logging is the act of keeping a log. In the simplest case,
messages are written to a single log file.
Wikipedia
How can we do log totally senseless?
Harmful advices:
● Do not use log-files!
● Never put datetime, log level, process id, thread id, specific entity grouping, message
itself into log message
● Never make file rolling!
● 15 GB log-file is ok
● 150+ GB log-file is perfect!
● Never zip old files
● Keep log files no more than 1 day (max 2 days)
● Nobody should to know about log-files!
● Never analyze log-files!
● Never put live data on big screen in developers room!
Logging levels or
how not to drown in gigs of data
+ custom log levels
Standard log levels built-in to Log4J 2 ™ intLevel
OFF 0
FATAL 100
ERROR 200
WARN 300
INFO 400
DEBUG 500
TRACE 600
ALL Int max
Most popular logging processors
Top 10 (?) Log Analysis Tools by KeyCDN:
1. Loggly
2. Logentries
3. GoAccess
4. logz.io
5. Graylog
6. Splunk
7. Logmatic.io
8. Logstash
9. Sumo Logic
10. Papertrail
11. Fluentd
Elastic Stack as a result of smoking in
the Netherlands
● Original author: Shay Banon
● Stable release: 6.4.2 / October 2, 2018 *
● Repository: github.com/elastic/elasticsearch
● Written in Java
● Operating system: Cross-platform
● Type: Search and index
● License: Apache License 2.0
● Website: www.elastic.co/products/elasticsearch
Elastic Stack as a result of smoking in
the Netherlands - cont.
● Shay Banon (Compass) 2004 - Downloads: 0
● June 2012 - Downloads: <16,000
● July 2015 - Downloads: 36,431,145
● October 2015 - Downloads: 44,378,846
● October 2016 - Downloads: 91,183,928
● May 2017 - Downloads: 137,715,884
● October 2017 - Downloads: 192,865,831
● February 2018 - Downloads: 267,972,265
18 offices in Europe, America, Asia
This beautiful Kibana
Kibana lets you visualize your Elasticsearch data and navigate the Elastic Stack, so you can
do anything from learning why you're getting paged at 2:00 a.m. to understanding the
impact rain might have on your quarterly numbers.
https://www.elastic.co/products/kibana
● Web UI
● Useful search and filtering
● Visualisations
● Dashboards
● Compute fields
This nimble and gluttonous
ElasticSearch
ElasticSearch is a distributed, RESTful search and analytics engine capable of solving a growing
number of use cases. As the heart of the Elastic Stack, it centrally stores your data so you can discover
the expected and uncover the unexpected.
https://www.elastic.co/products/elasticsearc
h
● ElasticSearch Is Fast. Really, Really Fast.
● Run It on Your Laptop or Hundreds of Servers with Petabytes of Data.
● Interact with ElasticSearch in the Programming Language You Choose.
● Extend ElasticSearch.
This terrifying LogStash
Logstash is an open source, server-side data processing pipeline that ingests data from a multitude of
sources simultaneously, transforms it, and then sends it to your favorite “stash”.
https://www.elastic.co/products/logstas
h
● Takes 1GB or RAM (Java!)
● Parsing and computing @ onboard machine
● Network consumption is tens of MBps
● Looooong start (Java!)
● GrOk and RegExp
● Not easy to debug the script
Classic solution:
Prod server(s) Kibana server(s)
Our Service
Log file(s)
LogStash
ElasticSearch
Indexes
Kibana
How it works
LogStash: real-life example (live demo)
● Log file of Spring Boot application
● Log4j2 with MDC for entity grouping
● Sample GrOk config file (input, filter, output)
○ Discussing config file
○ Example of RegExing
○ Example of debugging GrOk matcher
● Start Elastic Stack on Windows machine
● Scan sample log-files
● Magic of Kibana
○ Discovery
○ Visualisation
○ Dashboard
How can we avoid
pitfalls of LogStash?
● Takes 1GB or RAM (Java!) ⇒ Rewrite it on Go
● Parsing and computing @ onboard machine ⇒ Move to other machine
● Network consumption is tens of MBps ⇒ Zip data (?)
● Looooong start (Java!) ⇒ Rewrite it on Go
● GrOk and RegExp ⇒ Life is pain...
● Not easy to debug the script ⇒ Keep calm and heavy breathing...
Prod server(s) Kibana server(s)
Our Service
Log file(s)
LogStash
ElasticSearch
Indexes
Kibana
FileBeat
Beat solution:
How it works now
ElasticBeats or
“What else do you want from me?”
Beats (Lightweight Data Shippers) is the platform for single-purpose data shippers. They install as
lightweight agents and send data from hundreds or thousands of machines to Logstash or
Elasticsearch.
https://www.elastic.co/products/beats
● Filebeat, Metricbeat, Packetbeat, Winlogbeat, Auditbeat, Heartbeat, etc…
● Tens of community beats...
● … and custom Beat constructor
Useful links
● About https://en.wikipedia.org/wiki/Kibana
● https://www.elastic.co/products/kibana
● https://www.elastic.co/products/logstash
● https://www.elastic.co/products/elasticsearch
● Easy install-config manual: http://knes1.github.io/blog/2015/2015-08-16-manage-spring-boot-logs-with-
elasticsearch-kibana-and-logstash.html
● Default patterns for Grok parser: https://github.com/elastic/logstash/blob/v1.4.2/patterns/grok-patterns
● Web-site to test regular expressions: https://regex101.com/
● Web-site to test Grok expression: http://grokconstructor.appspot.com
● Search how-to: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/query-dsl-query-string-
query.html#query-string-syntax
Thank you for your
attention!
Any Questions?

More Related Content

Similar to Kibana+ElasticSearch+LogStash to handle Log messages on Prod servers

Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Omid Vahdaty
 
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
Omid Vahdaty
 

Similar to Kibana+ElasticSearch+LogStash to handle Log messages on Prod servers (20)

Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
 
Scalable, good, cheap
Scalable, good, cheapScalable, good, cheap
Scalable, good, cheap
 
Log Management Systems
Log Management SystemsLog Management Systems
Log Management Systems
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
 
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3
 
Activity feeds (and more) at mate1
Activity feeds (and more) at mate1Activity feeds (and more) at mate1
Activity feeds (and more) at mate1
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned
 
Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"Monitoring Big Data Systems - "The Simple Way"
Monitoring Big Data Systems - "The Simple Way"
 
Building data "Py-pelines"
Building data "Py-pelines"Building data "Py-pelines"
Building data "Py-pelines"
 
Data Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixData Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFix
 
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Berlin 2017
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Berlin 2017Monitoring Big Data Systems Done "The Simple Way" - Codemotion Berlin 2017
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Berlin 2017
 
Austin bdug 2011_01_27_small_and_big_data
Austin bdug 2011_01_27_small_and_big_dataAustin bdug 2011_01_27_small_and_big_data
Austin bdug 2011_01_27_small_and_big_data
 
Serverless for High Performance Computing
Serverless for High Performance ComputingServerless for High Performance Computing
Serverless for High Performance Computing
 
Log Management: AtlSecCon2015
Log Management: AtlSecCon2015Log Management: AtlSecCon2015
Log Management: AtlSecCon2015
 
Stream, Stream, Stream: Different Streaming Methods with Apache Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Apache Spark and KafkaStream, Stream, Stream: Different Streaming Methods with Apache Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Apache Spark and Kafka
 
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
 
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
Demi Ben-Ari - Monitoring Big Data Systems Done "The Simple Way" - Codemotion...
 
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
 
AWS re:Invent 2016 Fast Forward
AWS re:Invent 2016 Fast ForwardAWS re:Invent 2016 Fast Forward
AWS re:Invent 2016 Fast Forward
 
Hadoop con2016 - Implement Real-time Centralized logging System by Elastic Stack
Hadoop con2016 - Implement Real-time Centralized logging System by Elastic StackHadoop con2016 - Implement Real-time Centralized logging System by Elastic Stack
Hadoop con2016 - Implement Real-time Centralized logging System by Elastic Stack
 

More from HYS Enterprise

Evgeniy Burak (HYS Enterprise): “Spring Data REST or intellectual job VS manual”
Evgeniy Burak (HYS Enterprise): “Spring Data REST or intellectual job VS manual”Evgeniy Burak (HYS Enterprise): “Spring Data REST or intellectual job VS manual”
Evgeniy Burak (HYS Enterprise): “Spring Data REST or intellectual job VS manual”
HYS Enterprise
 

More from HYS Enterprise (20)

Magic of web components
Magic of web componentsMagic of web components
Magic of web components
 
“ASP.NET Core. Features and architecture”
“ASP.NET Core. Features and architecture” “ASP.NET Core. Features and architecture”
“ASP.NET Core. Features and architecture”
 
How to create a perfect CV and make a good impression at an interview
How to create a perfect CV and make a good impression at an interviewHow to create a perfect CV and make a good impression at an interview
How to create a perfect CV and make a good impression at an interview
 
Top soft skills to get a job
Top soft skills to get a jobTop soft skills to get a job
Top soft skills to get a job
 
Saga pattern
Saga patternSaga pattern
Saga pattern
 
Wild Async .NET world: AID Kit for boy-scouts
Wild Async .NET world: AID Kit for boy-scoutsWild Async .NET world: AID Kit for boy-scouts
Wild Async .NET world: AID Kit for boy-scouts
 
Contract testing. Getting started with Pact IO.
Contract testing. Getting started with Pact IO.Contract testing. Getting started with Pact IO.
Contract testing. Getting started with Pact IO.
 
Testing strategies in a microservices architecture. Independence vs integration
Testing strategies in a microservices architecture.  Independence vs integrationTesting strategies in a microservices architecture.  Independence vs integration
Testing strategies in a microservices architecture. Independence vs integration
 
Leonid Sushenko "Pro scrum"
Leonid Sushenko "Pro scrum"Leonid Sushenko "Pro scrum"
Leonid Sushenko "Pro scrum"
 
"Test Design Techniques"
"Test Design Techniques" "Test Design Techniques"
"Test Design Techniques"
 
Essentials soft skills for a developer
Essentials soft skills for a developerEssentials soft skills for a developer
Essentials soft skills for a developer
 
“Tips&Tricks&Antitricks with .Net Core backend in GameDev”
“Tips&Tricks&Antitricks with .Net Core backend in GameDev”“Tips&Tricks&Antitricks with .Net Core backend in GameDev”
“Tips&Tricks&Antitricks with .Net Core backend in GameDev”
 
"Dealing with legacy code"
"Dealing with legacy code""Dealing with legacy code"
"Dealing with legacy code"
 
“QA job interview: life hacks and scripts for success”
“QA job interview: life hacks and scripts for success”“QA job interview: life hacks and scripts for success”
“QA job interview: life hacks and scripts for success”
 
Evgeniy Burak (HYS Enterprise): “Spring Data REST or intellectual job VS manual”
Evgeniy Burak (HYS Enterprise): “Spring Data REST or intellectual job VS manual”Evgeniy Burak (HYS Enterprise): “Spring Data REST or intellectual job VS manual”
Evgeniy Burak (HYS Enterprise): “Spring Data REST or intellectual job VS manual”
 
Dmitriy Mustafin (HYS Enterprise) "Web UI for Back-end developer."
Dmitriy Mustafin (HYS Enterprise) "Web UI for Back-end developer."Dmitriy Mustafin (HYS Enterprise) "Web UI for Back-end developer."
Dmitriy Mustafin (HYS Enterprise) "Web UI for Back-end developer."
 
Nikolay Tsyb (HYS Enterprise) "Immortal system as a piece of cake."
Nikolay Tsyb (HYS Enterprise) "Immortal system as a piece of cake."Nikolay Tsyb (HYS Enterprise) "Immortal system as a piece of cake."
Nikolay Tsyb (HYS Enterprise) "Immortal system as a piece of cake."
 
Я твой Expected Result шатал
Я твой Expected Result шаталЯ твой Expected Result шатал
Я твой Expected Result шатал
 
“Elasticsearch for .NET developers”
“Elasticsearch for .NET developers”  “Elasticsearch for .NET developers”
“Elasticsearch for .NET developers”
 
“Microservices: how to avoid making the same mistake twice.”
“Microservices: how to avoid making the same mistake twice.”“Microservices: how to avoid making the same mistake twice.”
“Microservices: how to avoid making the same mistake twice.”
 

Recently uploaded

RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
Atif Razi
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
Kamal Acharya
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
Kamal Acharya
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 

Recently uploaded (20)

CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
 
ENERGY STORAGE DEVICES INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES  INTRODUCTION UNIT-IENERGY STORAGE DEVICES  INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES INTRODUCTION UNIT-I
 
İTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering WorkshopİTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering Workshop
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
 
Toll tax management system project report..pdf
Toll tax management system project report..pdfToll tax management system project report..pdf
Toll tax management system project report..pdf
 
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdfA CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Danfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdfDanfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdf
 
Explosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdfExplosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdf
 

Kibana+ElasticSearch+LogStash to handle Log messages on Prod servers

  • 1. Kibana + ElasticSearch + LogStash By Dmitriy Mustafin JavaMeetup handle Log messages on Prod servers
  • 2. My experience - I started with machine code and punched cards. I used to write on Assembler, then on C and Pascal, С++, Delphi, C#, Javascript, and some other scripting languages. Now I mostly write on Java, and I’m pretty much happy with that. - DOS (it was a wonderful to have 21h interrupt), OS/2, QNX, Windows (my favorite so far), Linux (and Yocto as well), MacOS/iOS. - I studied at university but I still haven't defended my thesis (and I'm not planning on doing this anytime soon). I keep learning new things during my work. - I was writing, designing, engineering, managing and solving problems. - Married, children, cat.
  • 3. HYS Enterprise is a Dutch software development company with more than 200 talented engineers from all over the world hys-enterprise.com
  • 4. Agenda ● What is log and what’s this for? ● How can we do log totally senseless? ● Logging levels or how not to drown in gigs of data ● Most popular logging processors ● Elastic Stack as a result of smoking in the Netherlands ● This beautiful Kibana ● This nimble and gluttonous ElasticSearch ● This terrifying LogStash ● LogStash: real-life example (or even live demo) ● How can we avoid pitfalls of LogStash? ● ElasticBeats or “What else do you want from me?”
  • 5. What is log and what’s this for? In computing, a log file is a file that records either events that occur in an operating system or other software runs, or messages between different users of a communication software. Logging is the act of keeping a log. In the simplest case, messages are written to a single log file. Wikipedia
  • 6. How can we do log totally senseless? Harmful advices: ● Do not use log-files! ● Never put datetime, log level, process id, thread id, specific entity grouping, message itself into log message ● Never make file rolling! ● 15 GB log-file is ok ● 150+ GB log-file is perfect! ● Never zip old files ● Keep log files no more than 1 day (max 2 days) ● Nobody should to know about log-files! ● Never analyze log-files! ● Never put live data on big screen in developers room!
  • 7. Logging levels or how not to drown in gigs of data + custom log levels Standard log levels built-in to Log4J 2 ™ intLevel OFF 0 FATAL 100 ERROR 200 WARN 300 INFO 400 DEBUG 500 TRACE 600 ALL Int max
  • 8. Most popular logging processors Top 10 (?) Log Analysis Tools by KeyCDN: 1. Loggly 2. Logentries 3. GoAccess 4. logz.io 5. Graylog 6. Splunk 7. Logmatic.io 8. Logstash 9. Sumo Logic 10. Papertrail 11. Fluentd
  • 9. Elastic Stack as a result of smoking in the Netherlands ● Original author: Shay Banon ● Stable release: 6.4.2 / October 2, 2018 * ● Repository: github.com/elastic/elasticsearch ● Written in Java ● Operating system: Cross-platform ● Type: Search and index ● License: Apache License 2.0 ● Website: www.elastic.co/products/elasticsearch
  • 10. Elastic Stack as a result of smoking in the Netherlands - cont. ● Shay Banon (Compass) 2004 - Downloads: 0 ● June 2012 - Downloads: <16,000 ● July 2015 - Downloads: 36,431,145 ● October 2015 - Downloads: 44,378,846 ● October 2016 - Downloads: 91,183,928 ● May 2017 - Downloads: 137,715,884 ● October 2017 - Downloads: 192,865,831 ● February 2018 - Downloads: 267,972,265 18 offices in Europe, America, Asia
  • 11. This beautiful Kibana Kibana lets you visualize your Elasticsearch data and navigate the Elastic Stack, so you can do anything from learning why you're getting paged at 2:00 a.m. to understanding the impact rain might have on your quarterly numbers. https://www.elastic.co/products/kibana ● Web UI ● Useful search and filtering ● Visualisations ● Dashboards ● Compute fields
  • 12.
  • 13.
  • 14. This nimble and gluttonous ElasticSearch ElasticSearch is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data so you can discover the expected and uncover the unexpected. https://www.elastic.co/products/elasticsearc h ● ElasticSearch Is Fast. Really, Really Fast. ● Run It on Your Laptop or Hundreds of Servers with Petabytes of Data. ● Interact with ElasticSearch in the Programming Language You Choose. ● Extend ElasticSearch.
  • 15. This terrifying LogStash Logstash is an open source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to your favorite “stash”. https://www.elastic.co/products/logstas h ● Takes 1GB or RAM (Java!) ● Parsing and computing @ onboard machine ● Network consumption is tens of MBps ● Looooong start (Java!) ● GrOk and RegExp ● Not easy to debug the script
  • 16. Classic solution: Prod server(s) Kibana server(s) Our Service Log file(s) LogStash ElasticSearch Indexes Kibana How it works
  • 17. LogStash: real-life example (live demo) ● Log file of Spring Boot application ● Log4j2 with MDC for entity grouping ● Sample GrOk config file (input, filter, output) ○ Discussing config file ○ Example of RegExing ○ Example of debugging GrOk matcher ● Start Elastic Stack on Windows machine ● Scan sample log-files ● Magic of Kibana ○ Discovery ○ Visualisation ○ Dashboard
  • 18. How can we avoid pitfalls of LogStash? ● Takes 1GB or RAM (Java!) ⇒ Rewrite it on Go ● Parsing and computing @ onboard machine ⇒ Move to other machine ● Network consumption is tens of MBps ⇒ Zip data (?) ● Looooong start (Java!) ⇒ Rewrite it on Go ● GrOk and RegExp ⇒ Life is pain... ● Not easy to debug the script ⇒ Keep calm and heavy breathing...
  • 19. Prod server(s) Kibana server(s) Our Service Log file(s) LogStash ElasticSearch Indexes Kibana FileBeat Beat solution: How it works now
  • 20. ElasticBeats or “What else do you want from me?” Beats (Lightweight Data Shippers) is the platform for single-purpose data shippers. They install as lightweight agents and send data from hundreds or thousands of machines to Logstash or Elasticsearch. https://www.elastic.co/products/beats ● Filebeat, Metricbeat, Packetbeat, Winlogbeat, Auditbeat, Heartbeat, etc… ● Tens of community beats... ● … and custom Beat constructor
  • 21. Useful links ● About https://en.wikipedia.org/wiki/Kibana ● https://www.elastic.co/products/kibana ● https://www.elastic.co/products/logstash ● https://www.elastic.co/products/elasticsearch ● Easy install-config manual: http://knes1.github.io/blog/2015/2015-08-16-manage-spring-boot-logs-with- elasticsearch-kibana-and-logstash.html ● Default patterns for Grok parser: https://github.com/elastic/logstash/blob/v1.4.2/patterns/grok-patterns ● Web-site to test regular expressions: https://regex101.com/ ● Web-site to test Grok expression: http://grokconstructor.appspot.com ● Search how-to: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/query-dsl-query-string- query.html#query-string-syntax
  • 22. Thank you for your attention! Any Questions?