SlideShare a Scribd company logo
How about no grep and zabbix?
or
ELK based metrics and alerts.
Vladimir Pavkin
QIWI Conf #3
Scala Developer
gettopical.com
Plan
ELK stack components
ELK setups
Basic usage (grep)
Advanced usage (alerts, metrics)
Da heck is ELK?
Elasticsearch
Logstash
Kibana
Logstash
Inputs
1+
Filters
0+
Outputs
1+
• raw data
• various formats
• enriched events
• standard formats
Logstash inputs
file, syslog, log4j
http, tcp, udp
rabbitmq
twitter, rss
…
Logstash filters
grok
geoip
drop, clone, mutate, split
…
Logstash outputs
stdout, file
elasticsearch
rabbitmq
http, tcp, udp
…
Logstash transformation example
127.0.0.1 - - [11/Dec/2013:00:01:45 -0800]
"GET /xampp/status.php HTTP/1.1" 200 3891
"http://cadenza/xampp/navi.php" "Mozilla/5.0 (Macintosh;
Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0"
Logstash transformation example
{
"message" : "127.0.0.1 - - [11/Dec/2013:00:01:45 -0800] "GET /xampp/status.php
HTTP/1.1" 200 3891 "http://cadenza/xampp/navi.php" "Mozilla/5.0 (Macintosh;
Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0"",
"@timestamp" : "2013-12-11T08:01:45.000Z",
"@version" : "1",
"host" : "cadenza",
"clientip" : "127.0.0.1",
"path" : "/xampp/status.php",
"response" : "200",
// ...
}
Elasticsearch
Distributed data storage, optimized for text
search.
Is managed/queried through HTTP REST API.
Based on open-source Apache Lucene
project.
Elasticsearch vocab
Document - data unit used for indexing
and searching. Contains fields. (JSON)
Field - a part of a Document, has a
name and a value.
Term - the unit of search. A word we
look for in text
Elasticsearch inverted index
Documents:
1 => How about no grep
2 => How about no zabbix
Index:
how => <1>, <2>
about => <1>, <2>
zabbix => <2>
...
Elasticsearch query DSL
message:exception
log_level:(ERROR OR INFO)
stack_trace:”Out of memory”
_exists_:body
date:[now-1h TO now]
age:(>=10 AND <20)
wildcards (*, ?)
regex search
fuzzy search (Levenshtein)
proximity search
boosting weights
Elasticsearch query DSL
Even more power with JSON query DSL:
{
"query_string" : {
"fields" : [“message", “stack_trace"],
"query" : “exception AND fatal"
}
}
Elasticsearch clustering
Just easy as hell
Kibana
Converts these:
{
"message" : "127.0.0.1 - - [11/Dec/2013:00:01:45 -0800] "GET /xampp/status.php
HTTP/1.1" 200 3891 "http://cadenza/xampp/navi.php" "Mozilla/5.0 (Macintosh; Intel
Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0"",
"@timestamp" : "2013-12-11T08:01:45.000Z",
"@version" : "1",
"host" : "cadenza",
"clientip" : "127.0.0.1",
"path" : "/xampp/status.php",
"response" : "200",
// ...
}
Kibana
To this:
Kibana timestamp field
Not strings/objects
Events!
ELK Setups
Simple setup (startup mode)
App1
App2
App3
logback
logback
logback
VPN
Single
instance
Logstash
Elastic
search
TCP/UDP
port
http:9200
Kibana
http:5601
Complex setup (QIWI)
App1
VPN
Logstash
logback
RMQ
App2
Logstash
logback
RMQ
RMQ
Elasticsearch
Elasticsearch
Elasticsearch
Kibana
RMQ
RMQ
RMQ
Basic ELK
usage scenarios
1. Search that whole cluster!
Events from all your apps are in one place!
Rocking useful and flexible timeline
Powerful, text oriented search engine
2. Default logback fields
Quickly filter events by:
Host name or IP
Log level, logger name
Search only in stack trace.
3. Customize and save searches
Save frequently used search
Show only specific fields
(e.g. message and host name)
Showtime
Advanced ELK.
Metrics and alerts.
1. Custom fields (search/filter)
Payment event:
{
“user” : “9112223344”,
“amount” : 500.00,
“provider” : 464
}
Log custom fields (JVM)
<appender name="LOGSTASH"
class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>127.0.0.1:4560</destination>
</appender>
<root level="DEBUG">
<!--...-->
<appender-ref ref="LOGSTASH" />
</root>
libraryDependencies +=
"net.logstash.logback" % "logstash-logback-encoder" % "4.5.1"
Log custom fields (JVM)
import net.logstash.logback.marker.Markers._
val fields = Map[String, Any](
"str_field" -> "str_value",
"num_field" -> 666
)
logger.info(appendEntries(fields), "log message");
2. Elastalert
Configured with a set of “rules”
Performs periodical queries to ES
Triggers alerts for matched rules
2. Elastalert rule types
Frequency
Spike
Flatline
Cardinality
Blacklist, Whitelist
Arbitrary query
# rules/500_frequency.yaml
es_host: localhost
es_port: 9200
name: 500 code frequency alert
type: frequency
index: logstash-*
num_events: 50
timeframe:
minutes: 1
alert:
- "email"
email:
- “s.solonin@qiwi.ru"
2. Elastalert alert types
Email
Slack
Jira
Custom shell command
2. Elastalert with custom fields
Any alert you can imagine can be
implemented on custom fields:
Average payment drops below 300 RUB
Processing response latency spike
User A buys something on Herbalife
3. Monitoring and Metrics
Realtime
Lots of aggregations
Beautiful visualizations
Super power with custom fields
"How about no grep and zabbix?". ELK based alerts and metrics.
"How about no grep and zabbix?". ELK based alerts and metrics.
Showtime
3. Why so useful?
Tech monitoring (UI and flexibility)
Business metrics (approx.)
Alerts (both tech and business)
Instant market/system reaction
Thanks !

More Related Content

What's hot (20)

PDF
Open Source Logging and Monitoring Tools
Phase2
 
PDF
ELK, a real case study
Paolo Tonin
 
PPTX
ELK Stack
Phuc Nguyen
 
PDF
ELK introduction
Waldemar Neto
 
PPTX
Elastic - ELK, Logstash & Kibana
SpringPeople
 
PPTX
Logstash
Rajgourav Jain
 
PPTX
The ELK Stack - Get to Know Logs
GlobalLogic Ukraine
 
PDF
LogStash in action
Manuj Aggarwal
 
PPTX
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...
ForgeRock
 
PPTX
Centralised logging with ELK stack
Simon Hanmer
 
PDF
Log analysis with the elk stack
Vikrant Chauhan
 
PPTX
ELK Elasticsearch Logstash and Kibana Stack for Log Management
El Mahdi Benzekri
 
PPTX
Introduction to ELK
Harshakumar Ummerpillai
 
PDF
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Startit
 
PPTX
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
BizTalk360
 
PPTX
How bol.com makes sense of its logs, using the Elastic technology stack.
Renzo Tomà
 
PPTX
More kibana
琛琳 饶
 
PPTX
Log analysis using Logstash,ElasticSearch and Kibana
Avinash Ramineni
 
PDF
Real-time data analysis using ELK
Jettro Coenradie
 
PDF
Natural Language Query and Conversational Interface to Apache Spark
Databricks
 
Open Source Logging and Monitoring Tools
Phase2
 
ELK, a real case study
Paolo Tonin
 
ELK Stack
Phuc Nguyen
 
ELK introduction
Waldemar Neto
 
Elastic - ELK, Logstash & Kibana
SpringPeople
 
Logstash
Rajgourav Jain
 
The ELK Stack - Get to Know Logs
GlobalLogic Ukraine
 
LogStash in action
Manuj Aggarwal
 
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...
ForgeRock
 
Centralised logging with ELK stack
Simon Hanmer
 
Log analysis with the elk stack
Vikrant Chauhan
 
ELK Elasticsearch Logstash and Kibana Stack for Log Management
El Mahdi Benzekri
 
Introduction to ELK
Harshakumar Ummerpillai
 
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Startit
 
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
BizTalk360
 
How bol.com makes sense of its logs, using the Elastic technology stack.
Renzo Tomà
 
More kibana
琛琳 饶
 
Log analysis using Logstash,ElasticSearch and Kibana
Avinash Ramineni
 
Real-time data analysis using ELK
Jettro Coenradie
 
Natural Language Query and Conversational Interface to Apache Spark
Databricks
 

Viewers also liked (17)

PDF
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Andrii Vozniuk
 
PPTX
Attack monitoring using ElasticSearch Logstash and Kibana
Prajal Kulkarni
 
PPTX
Elk stack
Jilles van Gurp
 
PPTX
ELK at LinkedIn - Kafka, scaling, lessons learned
Tin Le
 
PPTX
MySQL Audit using Percona audit plugin and ELK
YoungHeon (Roy) Kim
 
PPTX
My Bro The ELK
Tripwire
 
PPTX
Scaling an ELK stack at bol.com
Renzo Tomà
 
PDF
JOSA TechTalk: Realtime monitoring and alerts
Jordan Open Source Association
 
PDF
How to create custom dashboards in Elastic Search / Kibana with Performance V...
PerformanceVision (previously SecurActive)
 
PDF
Платёжная система Qiwi
Irina Oshnurova
 
PDF
How to win skeptics to aggregated logging using Vagrant and ELK
Skelton Thatcher Consulting Ltd
 
PDF
Is big data handicapped by "design"? Seven design principles for communicatin...
Zach Gemignani
 
PPTX
Diventare famosi con lo stack ELK - Alfonso Iannotta
Data Driven Innovation
 
PPTX
L'architettura di classe enterprise di nuova generazione - Massimo Brignoli
Data Driven Innovation
 
PPTX
ELK Stack - Kibana操作實務
Kedy Chang
 
PPTX
New OSSIM v5.0 - Get Security Visibility Faster & Easier Than Ever
AlienVault
 
PDF
Elasitcsearch + Logstash + Kibana 日誌監控
Jui An Huang (黃瑞安)
 
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Andrii Vozniuk
 
Attack monitoring using ElasticSearch Logstash and Kibana
Prajal Kulkarni
 
Elk stack
Jilles van Gurp
 
ELK at LinkedIn - Kafka, scaling, lessons learned
Tin Le
 
MySQL Audit using Percona audit plugin and ELK
YoungHeon (Roy) Kim
 
My Bro The ELK
Tripwire
 
Scaling an ELK stack at bol.com
Renzo Tomà
 
JOSA TechTalk: Realtime monitoring and alerts
Jordan Open Source Association
 
How to create custom dashboards in Elastic Search / Kibana with Performance V...
PerformanceVision (previously SecurActive)
 
Платёжная система Qiwi
Irina Oshnurova
 
How to win skeptics to aggregated logging using Vagrant and ELK
Skelton Thatcher Consulting Ltd
 
Is big data handicapped by "design"? Seven design principles for communicatin...
Zach Gemignani
 
Diventare famosi con lo stack ELK - Alfonso Iannotta
Data Driven Innovation
 
L'architettura di classe enterprise di nuova generazione - Massimo Brignoli
Data Driven Innovation
 
ELK Stack - Kibana操作實務
Kedy Chang
 
New OSSIM v5.0 - Get Security Visibility Faster & Easier Than Ever
AlienVault
 
Elasitcsearch + Logstash + Kibana 日誌監控
Jui An Huang (黃瑞安)
 
Ad

Similar to "How about no grep and zabbix?". ELK based alerts and metrics. (20)

PPTX
Log management with ELK
Geert Pante
 
PDF
2015 03-16-elk at-bsides
Jeremy Cohoe
 
PPTX
Elk
Caleb Wang
 
PDF
Mulesoft ELK
Integration Assistance
 
PDF
ELK: a log management framework
Giovanni Bechis
 
PDF
Logs aggregation and analysis
Divante
 
PDF
elkstack-161217091231.pdf
AgusNursidik
 
PPTX
Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Gaurav Sethi
 
PPTX
Introduction to Monitoring Tools for DevOps
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
PPTX
Introduction to Monitoring Tools for DevOps
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
PDF
ELK stack introduction
abenyeung1
 
PDF
Null Bachaav - May 07 Attack Monitoring workshop.
Prajal Kulkarni
 
PPTX
Centralized Logging System Using ELK Stack
Rohit Sharma
 
PPTX
Elastic Stack Introduction
Vikram Shinde
 
PPTX
Log analysis using Logstash,ElasticSearch and Kibana - Desert Code Camp 2014
clairvoyantllc
 
PPT
Elk presentation 2#3
uzzal basak
 
PPT
Logstash
琛琳 饶
 
PDF
ELK Wrestling (Leeds DevOps)
Steve Elliott
 
PDF
Présentation ELK/SIEM et démo Wazuh
Aurélie Henriot
 
PPTX
Search and analyze data in real time
Rohit Kalsarpe
 
Log management with ELK
Geert Pante
 
2015 03-16-elk at-bsides
Jeremy Cohoe
 
ELK: a log management framework
Giovanni Bechis
 
Logs aggregation and analysis
Divante
 
elkstack-161217091231.pdf
AgusNursidik
 
Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Gaurav Sethi
 
Introduction to Monitoring Tools for DevOps
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
Introduction to Monitoring Tools for DevOps
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
ELK stack introduction
abenyeung1
 
Null Bachaav - May 07 Attack Monitoring workshop.
Prajal Kulkarni
 
Centralized Logging System Using ELK Stack
Rohit Sharma
 
Elastic Stack Introduction
Vikram Shinde
 
Log analysis using Logstash,ElasticSearch and Kibana - Desert Code Camp 2014
clairvoyantllc
 
Elk presentation 2#3
uzzal basak
 
Logstash
琛琳 饶
 
ELK Wrestling (Leeds DevOps)
Steve Elliott
 
Présentation ELK/SIEM et démo Wazuh
Aurélie Henriot
 
Search and analyze data in real time
Rohit Kalsarpe
 
Ad

Recently uploaded (20)

PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 

"How about no grep and zabbix?". ELK based alerts and metrics.