ELK Stack - Turn boring logfiles into sexy dashboard

FINDOLOGIC GmbH 
Boring Logfiles → Sexy Dashboards
Boring Logfiles 
178.236.7.219 - - [27/Oct/2014:06:43:13 +0100] "GET 
/ps/amazon.de/index.php?shopkey=DEADBEEF&shopurl=https 
%3A%2F%2Fwww.amazon.de 
%2F&multishop_id=0&userip=173.194.112.2&referer=https 
%3A%2F%2Fwww.amazon.de%2FTechnik 
%2FFernseher&count=0&group[]=2&service=search&query=le 
d HTTP/1.1" 200 12363 "-" "-"
Sexy Dashboards
Stack 
● Elasticsearch 
● Logstash 
● Kibana
Infrastruktur 
App 1 App 2 App 3 
Logstash 1 Logstash 2 Logstash 3 
ElasticSearch 
Kibana
Logstash Architektur 
Input Filter Output 
● Grok 
● Search / Replace 
● Split 
● GeoIP 
● DNS 
● URL-Decode 
● ... 
● ElasticSearch 
● Redis 
● CouchDB 
● ... 
● Pipe 
● Socket 
● File 
● ...
Logstash stand-alone 
● Logs zentralisieren 
● In DB speichern 
● Durchsuchbar machen
Setup 
● Logstash herunterladen, extrahieren 
● Elasticsearch installieren 
● fertig
Georg? 
● CTO bei FINDOLOGIC GmbH 
● http://www.findologic.com 
● g.sorst@findologic.com 
● @piefke_schorsch
Hands on 
● Grok 
● kv 
● Query 
● Endpoint 
● GeoIP
Logstash.conf 
input { 
file { 
path => "/home/georg/coding/logstash-apache/access.log" 
start_position => beginning 
} 
#pipe { 
# command => "ssh frontend1.findologic.com tail -f /var/log/apache2/access.log" 
#} 
} 
filter { 
grok { 
match => { "message" => "%{IPORHOST:clientip} %{USER:ident} %{USER:auth} [%{HTTPDATE:timestamp}] "(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})" %{NUMBER:response} (?:%{NUMBER:bytes}|-) %{QS:referrer} %{QS:agent}" } 
} 
# split the query string: query=test&count=0&first=10 → request_query: test, request_count: 0, request_first: 10 
kv { 
field_split => "&?" 
source => "request" 
prefix => "request_" 
} 
# urldecode does not decode the + into whitespace so do this manually 
mutate { 
gsub => [ 
"request_query", "+", " " 
] 
} 
# URL-decode the query so it is easier to read. We don't really about the other request_* parameters 
urldecode { 
field => "request_query" 
} 
# extract the script file, eg. index.php 
mutate { 
gsub => [ 
# Remove the query string including the ? : /path/index.php?key=value -> /path/index.php 
"request", "?.*$", "", 
# Remove everything up to the last / : /path/index.php -> index.php 
"request", "^.*/", "" 
] 
} 
# Default to index.php if no script file is given 
if [request] == "" { 
mutate { 
replace => [ "request", "index.php" ] 
} 
} 
# If the IP is syntactically valid resolve it geographically 
if [request_userip] =~ "^d+.d+.d+.d+$" { 
geoip { 
source => "request_userip" 
target => "client_geoip" 
} 
} 
} 
output { 
elasticsearch { 
host => localhost 
} 
#stdout { codec => rubydebug } 
}
Kibana Dashboard 
{ 
"title": "Logstash Search", 
"services": { 
"query": { 
"list": { 
"0": { 
"query": "*", 
"alias": "", 
"color": "#7EB26D", 
"id": 0, 
"pin": false, 
"type": "lucene", 
"enable": true 
}, 
"1": { 
"id": 1, 
"color": "#EAB839", 
"alias": "Suche", 
"pin": false, 
"type": "lucene", 
"enable": true, 
"query": "request:index.php" 
}, 
"2": { 
"id": 2, 
"color": "#6ED0E0", 
"alias": "Autocomplete", 
"pin": false, 
"type": "lucene", 
"enable": true, 
"query": "request:autocomplete.php" 
}, 
"3": { 
"id": 3, 
"color": "#EF843C", 
"alias": "", 
"pin": false, 
"type": "lucene", 
"enable": true, 
"query": "client_geoip.country_code2:DE OR client_geoip.country_code2:AT OR client_geoip.country_code2:CH" 
} 
}, 
"ids": [ 
0, 
1, 
2, 
3 
] 
}, 
"filter": { 
"list": { 
"0": { 
"type": "time", 
"field": "@timestamp", 
"from": "now-24h", 
"to": "now", 
"mandate": "must", 
"active": true, 
"alias": "", 
"id": 0 
}, 
"1": { 
"type": "time", 
"from": "2014-10-27T18:04:33.357Z", 
"to": "2014-10-27T19:18:47.459Z", 
"field": "@timestamp", 
"mandate": "must", 
"active": true, 
"alias": "", 
"id": 1 
} 
}, 
"ids": [ 
0, 
1 
] 
} 
}, 
"rows": [ 
{ 
"title": "Graph", 
"height": "350px", 
"editable": true, 
"collapse": false, 
"collapsable": true, 
"panels": [ 
{ 
"span": 12, 
"editable": true, 
"group": [ 
"default" 
], 
"type": "histogram", 
"mode": "count", 
"time_field": "@timestamp", 
"value_field": null, 
"auto_int": true, 
"resolution": 100, 
"interval": "30s", 
"fill": 3, 
"linewidth": 3, 
"timezone": "browser", 
"spyable": true, 
"zoomlinks": true, 
"bars": true, 
"stack": true, 
"points": false, 
"lines": false, 
"legend": true, 
"x-axis": true, 
"y-axis": true, 
"percentage": false, 
"interactive": true, 
"queries": { 
"mode": "selected", 
"ids": [ 
1, 
2 
] 
}, 
"title": "Events over time", 
"intervals": [ 
"auto", 
"1s", 
"1m", 
"5m", 
"10m", 
"30m", 
"1h", 
"3h", 
"12h", 
"1d", 
"1w", 
"1M", 
"1y" 
], 
"options": true, 
"tooltip": { 
"value_type": "cumulative", 
"query_as_alias": true 
}, 
"scale": 1, 
"y_format": "none", 
"grid": { 
"max": null, 
"min": 0 
}, 
"annotate": { 
"enable": false, 
"query": "*", 
"size": 20, 
"field": "_type", 
"sort": [ 
"_score", 
"desc" 
] 
}, 
"pointradius": 5, 
"show_query": true, 
"legend_counts": true, 
"zerofill": true, 
"derivative": false 
} 
], 
"notice": false 
}, 
{ 
"title": "", 
"height": "350px", 
"editable": true, 
"collapse": false, 
"collapsable": true, 
"panels": [ 
{ 
"error": false, 
"span": 6, 
"editable": true, 
"type": "terms", 
"loadingEditor": false, 
"field": "request_query", 
"exclude": [], 
"missing": false, 
"other": false, 
"size": 10, 
"order": "count", 
"style": { 
"font-size": "10pt" 
}, 
"donut": false, 
"tilt": false, 
"labels": true, 
"arrangement": "horizontal", 
"chart": "pie", 
"counter_pos": "above", 
"spyable": true, 
"queries": { 
"mode": "all", 
"ids": [ 
0, 
1, 
2, 
3 
] 
}, 
"tmode": "terms", 
"tstat": "total", 
"valuefield": "" 
}, 
{ 
"error": false, 
"span": 6, 
"editable": true, 
"type": "bettermap", 
"loadingEditor": false, 
"field": "client_geoip.location", 
"size": 1000, 
"spyable": true, 
"tooltip": "_id", 
"queries": { 
"mode": "selected", 
"ids": [ 
3 
] 
} 
} 
], 
"notice": false 
}, 
{ 
"title": "Events", 
"height": "350px", 
"editable": true, 
"collapse": false, 
"collapsable": true, 
"panels": [ 
{ 
"title": "All events", 
"error": false, 
"span": 12, 
"editable": true, 
"group": [ 
"default" 
], 
"type": "table", 
"size": 100, 
"pages": 5, 
"offset": 0, 
"sort": [ 
"@timestamp", 
"desc" 
], 
"style": { 
"font-size": "9pt" 
}, 
"overflow": "min-height", 
"fields": [], 
"localTime": true, 
"timeField": "@timestamp", 
"highlight": [], 
"sortable": true, 
"header": true, 
"paging": true, 
"spyable": true, 
"queries": { 
"mode": "all", 
"ids": [ 
0, 
1, 
2, 
3 
] 
}, 
"field_list": true, 
"status": "Stable", 
"trimFactor": 300, 
"normTimes": true, 
"all_fields": false 
} 
], 
"notice": false 
} 
], 
"editable": true, 
"failover": false, 
"index": { 
"interval": "day", 
"pattern": "[logstash-]YYYY.MM.DD", 
"default": "NO_TIME_FILTER_OR_INDEX_PATTERN_NOT_MATCHED", 
"warm_fields": true 
}, 
"style": "light", 
"panel_hints": true, 
"pulldowns": [ 
{ 
"type": "query", 
"collapse": false, 
"notice": false, 
"query": "*", 
"pinned": true, 
"history": [ 
"client_geoip.country_code2:DE OR client_geoip.country_code2:AT OR client_geoip.country_code2:CH", 
"request:autocomplete.php", 
"request:index.php", 
"*" 
], 
"remember": 10, 
"enable": true 
}, 
{ 
"type": "filtering", 
"collapse": false, 
"notice": true, 
"enable": true 
} 
], 
"nav": [ 
{ 
"type": "timepicker", 
"collapse": false, 
"notice": false, 
"status": "Stable", 
"time_options": [ 
"5m", 
"15m", 
"1h", 
"6h", 
"12h", 
"24h", 
"2d", 
"7d", 
"30d" 
], 
"refresh_intervals": [ 
"5s", 
"10s", 
"30s", 
"1m", 
"5m", 
"15m", 
"30m", 
"1h", 
"2h", 
"1d" 
], 
"timefield": "@timestamp", 
"now": false, 
"filter_id": 0, 
"enable": true 
} 
], 
"loader": { 
"save_gist": false, 
"save_elasticsearch": true, 
"save_local": true, 
"save_default": true, 
"save_temp": true, 
"save_temp_ttl_enable": true, 
"save_temp_ttl": "30d", 
"load_gist": true, 
"load_elasticsearch": true, 
"load_elasticsearch_size": 20, 
"load_local": true, 
"hide": false 
}, 
"refresh": false 
} 
Vergrößern zum Anzeigen
1 von 12

Recomendados

Drupal Mobile von
Drupal MobileDrupal Mobile
Drupal MobileRuben Teijeiro
1.3K views30 Folien
Mongodb Aggregation Pipeline von
Mongodb Aggregation PipelineMongodb Aggregation Pipeline
Mongodb Aggregation Pipelinezahid-mian
14.5K views23 Folien
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana" von
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"South Tyrol Free Software Conference
390 views31 Folien
Normas apa y derechos de autor piktochart backup data (1) von
Normas apa y derechos de autor   piktochart backup data (1)Normas apa y derechos de autor   piktochart backup data (1)
Normas apa y derechos de autor piktochart backup data (1)000409123
289 views4 Folien
Kevin milla arbieto informatica piktochart backup data von
Kevin milla arbieto informatica   piktochart backup dataKevin milla arbieto informatica   piktochart backup data
Kevin milla arbieto informatica piktochart backup dataKevin Miguel Milla
271 views4 Folien
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting von
Apache CouchDB Presentation @ Sept. 2104 GTALUG MeetingApache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG MeetingMyles Braithwaite
405 views23 Folien

Más contenido relacionado

Was ist angesagt?

The Aggregation Framework von
The Aggregation FrameworkThe Aggregation Framework
The Aggregation FrameworkMongoDB
46.8K views50 Folien
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V... von
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...MongoDB
75.1K views23 Folien
IE9에서 HTML5 개발하기 von
IE9에서 HTML5 개발하기IE9에서 HTML5 개발하기
IE9에서 HTML5 개발하기Reagan Hwang
642 views45 Folien
JQuery Flot von
JQuery FlotJQuery Flot
JQuery FlotArshavski Alexander
4K views44 Folien
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2 von
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2MongoDB
10.7K views36 Folien
Using a mobile phone as a therapist - Superweek 2018 von
Using a mobile phone as a therapist - Superweek 2018Using a mobile phone as a therapist - Superweek 2018
Using a mobile phone as a therapist - Superweek 2018Peter Meyer
365 views56 Folien

Was ist angesagt?(20)

The Aggregation Framework von MongoDB
The Aggregation FrameworkThe Aggregation Framework
The Aggregation Framework
MongoDB46.8K views
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V... von MongoDB
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
MongoDB75.1K views
IE9에서 HTML5 개발하기 von Reagan Hwang
IE9에서 HTML5 개발하기IE9에서 HTML5 개발하기
IE9에서 HTML5 개발하기
Reagan Hwang642 views
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2 von MongoDB
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
MongoDB10.7K views
Using a mobile phone as a therapist - Superweek 2018 von Peter Meyer
Using a mobile phone as a therapist - Superweek 2018Using a mobile phone as a therapist - Superweek 2018
Using a mobile phone as a therapist - Superweek 2018
Peter Meyer365 views
CS442 - Rogue: A Scala DSL for MongoDB von jorgeortiz85
CS442 - Rogue: A Scala DSL for MongoDBCS442 - Rogue: A Scala DSL for MongoDB
CS442 - Rogue: A Scala DSL for MongoDB
jorgeortiz853.4K views
O que há de novo no Xamarin.Forms von akamud
O que há de novo no Xamarin.FormsO que há de novo no Xamarin.Forms
O que há de novo no Xamarin.Forms
akamud160 views
Example-driven Web API Specification Discovery von Javier Canovas
Example-driven Web API Specification DiscoveryExample-driven Web API Specification Discovery
Example-driven Web API Specification Discovery
Javier Canovas12.6K views
The Ring programming language version 1.3 book - Part 33 of 88 von Mahmoud Samir Fayed
The Ring programming language version 1.3 book - Part 33 of 88The Ring programming language version 1.3 book - Part 33 of 88
The Ring programming language version 1.3 book - Part 33 of 88
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V... von MongoDB
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
MongoDB Analytics: Learn Aggregation by Example - Exploratory Analytics and V...
MongoDB2K views
The Ring programming language version 1.9 book - Part 52 of 210 von Mahmoud Samir Fayed
The Ring programming language version 1.9 book - Part 52 of 210The Ring programming language version 1.9 book - Part 52 of 210
The Ring programming language version 1.9 book - Part 52 of 210
Building Single Page Apps with Backbone.js, Coffeescript and Rails 3.1 von Vagmi Mudumbai
Building Single Page Apps with Backbone.js, Coffeescript and Rails 3.1Building Single Page Apps with Backbone.js, Coffeescript and Rails 3.1
Building Single Page Apps with Backbone.js, Coffeescript and Rails 3.1
Vagmi Mudumbai1.9K views
MongoDB Europe 2016 - Graph Operations with MongoDB von MongoDB
MongoDB Europe 2016 - Graph Operations with MongoDBMongoDB Europe 2016 - Graph Operations with MongoDB
MongoDB Europe 2016 - Graph Operations with MongoDB
MongoDB7.9K views
Querying Nested JSON Data Using N1QL and Couchbase von Brant Burnett
Querying Nested JSON Data Using N1QL and CouchbaseQuerying Nested JSON Data Using N1QL and Couchbase
Querying Nested JSON Data Using N1QL and Couchbase
Brant Burnett2.2K views
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017 von Codemotion
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Codemotion945 views

Similar a ELK Stack - Turn boring logfiles into sexy dashboard

Peggy elasticsearch應用 von
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用LearningTech
304 views29 Folien
Real-Time Analytics with Solr: Presented by Yonik Seeley, Cloudera von
Real-Time Analytics with Solr: Presented by Yonik Seeley, ClouderaReal-Time Analytics with Solr: Presented by Yonik Seeley, Cloudera
Real-Time Analytics with Solr: Presented by Yonik Seeley, ClouderaLucidworks
3.2K views34 Folien
Elasticsearch intro output von
Elasticsearch intro outputElasticsearch intro output
Elasticsearch intro outputTom Chen
1.4K views57 Folien
Streaming Operational Data with MariaDB MaxScale von
Streaming Operational Data with MariaDB MaxScaleStreaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScaleMariaDB plc
1.2K views30 Folien
MongoDB and RDBMS von
MongoDB and RDBMSMongoDB and RDBMS
MongoDB and RDBMSfrancescapasha
737 views11 Folien
Real-time search in Drupal with Elasticsearch @Moldcamp von
Real-time search in Drupal with Elasticsearch @MoldcampReal-time search in Drupal with Elasticsearch @Moldcamp
Real-time search in Drupal with Elasticsearch @MoldcampAlexei Gorobets
1.2K views90 Folien

Similar a ELK Stack - Turn boring logfiles into sexy dashboard(20)

Peggy elasticsearch應用 von LearningTech
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
LearningTech304 views
Real-Time Analytics with Solr: Presented by Yonik Seeley, Cloudera von Lucidworks
Real-Time Analytics with Solr: Presented by Yonik Seeley, ClouderaReal-Time Analytics with Solr: Presented by Yonik Seeley, Cloudera
Real-Time Analytics with Solr: Presented by Yonik Seeley, Cloudera
Lucidworks3.2K views
Elasticsearch intro output von Tom Chen
Elasticsearch intro outputElasticsearch intro output
Elasticsearch intro output
Tom Chen1.4K views
Streaming Operational Data with MariaDB MaxScale von MariaDB plc
Streaming Operational Data with MariaDB MaxScaleStreaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScale
MariaDB plc1.2K views
Real-time search in Drupal with Elasticsearch @Moldcamp von Alexei Gorobets
Real-time search in Drupal with Elasticsearch @MoldcampReal-time search in Drupal with Elasticsearch @Moldcamp
Real-time search in Drupal with Elasticsearch @Moldcamp
Alexei Gorobets1.2K views
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam... von Codemotion
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Codemotion708 views
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi von InfluxData
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiMonitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
InfluxData228 views
Online | MongoDB Atlas on GCP Workshop von Natasha Wilson
Online | MongoDB Atlas on GCP Workshop Online | MongoDB Atlas on GCP Workshop
Online | MongoDB Atlas on GCP Workshop
Natasha Wilson128 views
MongoDB dla administratora von 3camp
MongoDB dla administratora MongoDB dla administratora
MongoDB dla administratora
3camp688 views
Webinar: Strongly Typed Languages and Flexible Schemas von MongoDB
Webinar: Strongly Typed Languages and Flexible SchemasWebinar: Strongly Typed Languages and Flexible Schemas
Webinar: Strongly Typed Languages and Flexible Schemas
MongoDB3K views
Parallel SQL and Analytics with Solr: Presented by Yonik Seeley, Cloudera von Lucidworks
Parallel SQL and Analytics with Solr: Presented by Yonik Seeley, ClouderaParallel SQL and Analytics with Solr: Presented by Yonik Seeley, Cloudera
Parallel SQL and Analytics with Solr: Presented by Yonik Seeley, Cloudera
Lucidworks1.8K views
d3sparql.js demo at SWAT4LS 2014 in Berlin von Toshiaki Katayama
d3sparql.js demo at SWAT4LS 2014 in Berlind3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in Berlin
Toshiaki Katayama2.9K views
Webinar: Applikationsentwicklung mit MongoDB : Teil 5: Reporting & Aggregation von MongoDB
Webinar: Applikationsentwicklung mit MongoDB: Teil 5: Reporting & AggregationWebinar: Applikationsentwicklung mit MongoDB: Teil 5: Reporting & Aggregation
Webinar: Applikationsentwicklung mit MongoDB : Teil 5: Reporting & Aggregation
MongoDB939 views
ELK - What's new and showcases von Andrii Gakhov
ELK - What's new and showcasesELK - What's new and showcases
ELK - What's new and showcases
Andrii Gakhov938 views
Large Scale Log Analytics with Solr (from Lucene Revolution 2015) von Sematext Group, Inc.
Large Scale Log Analytics with Solr (from Lucene Revolution 2015)Large Scale Log Analytics with Solr (from Lucene Revolution 2015)
Large Scale Log Analytics with Solr (from Lucene Revolution 2015)
Sematext Group, Inc. 11.8K views
Visual Exploration of Large Data sets with D3, crossfilter and dc.js von Florian Georg
Visual Exploration of Large Data sets with D3, crossfilter and dc.jsVisual Exploration of Large Data sets with D3, crossfilter and dc.js
Visual Exploration of Large Data sets with D3, crossfilter and dc.js
Florian Georg7.4K views
Edição de Texto Rico com React e Draft.js von Guilherme Vierno
Edição de Texto Rico com React e Draft.jsEdição de Texto Rico com React e Draft.js
Edição de Texto Rico com React e Draft.js
Guilherme Vierno3.8K views

Más de Georg Sorst

Psychological safety how to become a team that learns von
Psychological safety   how to become a team that learnsPsychological safety   how to become a team that learns
Psychological safety how to become a team that learnsGeorg Sorst
945 views22 Folien
Interactive Data Science Notebooks with Apache Zeppelin von
Interactive Data Science Notebooks with Apache ZeppelinInteractive Data Science Notebooks with Apache Zeppelin
Interactive Data Science Notebooks with Apache ZeppelinGeorg Sorst
523 views18 Folien
JS Error Logging with Sentry von
JS Error Logging with SentryJS Error Logging with Sentry
JS Error Logging with SentryGeorg Sorst
326 views14 Folien
Infrastructure = Code von
Infrastructure = CodeInfrastructure = Code
Infrastructure = CodeGeorg Sorst
1.1K views20 Folien
Das bedingungslose Grundeinkommen von
Das bedingungslose GrundeinkommenDas bedingungslose Grundeinkommen
Das bedingungslose GrundeinkommenGeorg Sorst
920 views20 Folien
Der FINDOLOGIC Entwicklungsprozess von
Der FINDOLOGIC EntwicklungsprozessDer FINDOLOGIC Entwicklungsprozess
Der FINDOLOGIC EntwicklungsprozessGeorg Sorst
871 views24 Folien

Más de Georg Sorst(7)

Psychological safety how to become a team that learns von Georg Sorst
Psychological safety   how to become a team that learnsPsychological safety   how to become a team that learns
Psychological safety how to become a team that learns
Georg Sorst945 views
Interactive Data Science Notebooks with Apache Zeppelin von Georg Sorst
Interactive Data Science Notebooks with Apache ZeppelinInteractive Data Science Notebooks with Apache Zeppelin
Interactive Data Science Notebooks with Apache Zeppelin
Georg Sorst523 views
JS Error Logging with Sentry von Georg Sorst
JS Error Logging with SentryJS Error Logging with Sentry
JS Error Logging with Sentry
Georg Sorst326 views
Infrastructure = Code von Georg Sorst
Infrastructure = CodeInfrastructure = Code
Infrastructure = Code
Georg Sorst1.1K views
Das bedingungslose Grundeinkommen von Georg Sorst
Das bedingungslose GrundeinkommenDas bedingungslose Grundeinkommen
Das bedingungslose Grundeinkommen
Georg Sorst920 views
Der FINDOLOGIC Entwicklungsprozess von Georg Sorst
Der FINDOLOGIC EntwicklungsprozessDer FINDOLOGIC Entwicklungsprozess
Der FINDOLOGIC Entwicklungsprozess
Georg Sorst871 views
Salzburg WebDev Meetup PHP Symfony von Georg Sorst
Salzburg WebDev Meetup PHP SymfonySalzburg WebDev Meetup PHP Symfony
Salzburg WebDev Meetup PHP Symfony
Georg Sorst1.8K views

Último

BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports von
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsRa'Fat Al-Msie'deen
5 views49 Folien
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx von
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptxanimuscrm
13 views19 Folien
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... von
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...Deltares
9 views24 Folien
Consulting for Data Monetization Maximizing the Profit Potential of Your Data... von
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...Flexsin
15 views10 Folien
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea... von
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...Safe Software
412 views59 Folien
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... von
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Donato Onofri
711 views34 Folien

Último(20)

BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports von Ra'Fat Al-Msie'deen
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx von animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm13 views
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... von Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 views
Consulting for Data Monetization Maximizing the Profit Potential of Your Data... von Flexsin
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Flexsin 15 views
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea... von Safe Software
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...
Safe Software412 views
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... von Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri711 views
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon von Deltares
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
Deltares13 views
Citi TechTalk Session 2: Kafka Deep Dive von confluent
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
confluent17 views
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -... von Deltares
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
Deltares6 views
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit... von Deltares
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
Deltares13 views
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove... von Deltares
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
Deltares17 views
Software testing company in India.pptx von SakshiPatel82
Software testing company in India.pptxSoftware testing company in India.pptx
Software testing company in India.pptx
SakshiPatel827 views
Neo4j y GenAI von Neo4j
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j42 views
What Can Employee Monitoring Software Do?​ von wAnywhere
What Can Employee Monitoring Software Do?​What Can Employee Monitoring Software Do?​
What Can Employee Monitoring Software Do?​
wAnywhere21 views
Tridens DevOps von Tridens
Tridens DevOpsTridens DevOps
Tridens DevOps
Tridens9 views

ELK Stack - Turn boring logfiles into sexy dashboard

  • 1. FINDOLOGIC GmbH Boring Logfiles → Sexy Dashboards
  • 2. Boring Logfiles 178.236.7.219 - - [27/Oct/2014:06:43:13 +0100] "GET /ps/amazon.de/index.php?shopkey=DEADBEEF&shopurl=https %3A%2F%2Fwww.amazon.de %2F&multishop_id=0&userip=173.194.112.2&referer=https %3A%2F%2Fwww.amazon.de%2FTechnik %2FFernseher&count=0&group[]=2&service=search&query=le d HTTP/1.1" 200 12363 "-" "-"
  • 4. Stack ● Elasticsearch ● Logstash ● Kibana
  • 5. Infrastruktur App 1 App 2 App 3 Logstash 1 Logstash 2 Logstash 3 ElasticSearch Kibana
  • 6. Logstash Architektur Input Filter Output ● Grok ● Search / Replace ● Split ● GeoIP ● DNS ● URL-Decode ● ... ● ElasticSearch ● Redis ● CouchDB ● ... ● Pipe ● Socket ● File ● ...
  • 7. Logstash stand-alone ● Logs zentralisieren ● In DB speichern ● Durchsuchbar machen
  • 8. Setup ● Logstash herunterladen, extrahieren ● Elasticsearch installieren ● fertig
  • 9. Georg? ● CTO bei FINDOLOGIC GmbH ● http://www.findologic.com ● g.sorst@findologic.com ● @piefke_schorsch
  • 10. Hands on ● Grok ● kv ● Query ● Endpoint ● GeoIP
  • 11. Logstash.conf input { file { path => "/home/georg/coding/logstash-apache/access.log" start_position => beginning } #pipe { # command => "ssh frontend1.findologic.com tail -f /var/log/apache2/access.log" #} } filter { grok { match => { "message" => "%{IPORHOST:clientip} %{USER:ident} %{USER:auth} [%{HTTPDATE:timestamp}] "(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})" %{NUMBER:response} (?:%{NUMBER:bytes}|-) %{QS:referrer} %{QS:agent}" } } # split the query string: query=test&count=0&first=10 → request_query: test, request_count: 0, request_first: 10 kv { field_split => "&?" source => "request" prefix => "request_" } # urldecode does not decode the + into whitespace so do this manually mutate { gsub => [ "request_query", "+", " " ] } # URL-decode the query so it is easier to read. We don't really about the other request_* parameters urldecode { field => "request_query" } # extract the script file, eg. index.php mutate { gsub => [ # Remove the query string including the ? : /path/index.php?key=value -> /path/index.php "request", "?.*$", "", # Remove everything up to the last / : /path/index.php -> index.php "request", "^.*/", "" ] } # Default to index.php if no script file is given if [request] == "" { mutate { replace => [ "request", "index.php" ] } } # If the IP is syntactically valid resolve it geographically if [request_userip] =~ "^d+.d+.d+.d+$" { geoip { source => "request_userip" target => "client_geoip" } } } output { elasticsearch { host => localhost } #stdout { codec => rubydebug } }
  • 12. Kibana Dashboard { "title": "Logstash Search", "services": { "query": { "list": { "0": { "query": "*", "alias": "", "color": "#7EB26D", "id": 0, "pin": false, "type": "lucene", "enable": true }, "1": { "id": 1, "color": "#EAB839", "alias": "Suche", "pin": false, "type": "lucene", "enable": true, "query": "request:index.php" }, "2": { "id": 2, "color": "#6ED0E0", "alias": "Autocomplete", "pin": false, "type": "lucene", "enable": true, "query": "request:autocomplete.php" }, "3": { "id": 3, "color": "#EF843C", "alias": "", "pin": false, "type": "lucene", "enable": true, "query": "client_geoip.country_code2:DE OR client_geoip.country_code2:AT OR client_geoip.country_code2:CH" } }, "ids": [ 0, 1, 2, 3 ] }, "filter": { "list": { "0": { "type": "time", "field": "@timestamp", "from": "now-24h", "to": "now", "mandate": "must", "active": true, "alias": "", "id": 0 }, "1": { "type": "time", "from": "2014-10-27T18:04:33.357Z", "to": "2014-10-27T19:18:47.459Z", "field": "@timestamp", "mandate": "must", "active": true, "alias": "", "id": 1 } }, "ids": [ 0, 1 ] } }, "rows": [ { "title": "Graph", "height": "350px", "editable": true, "collapse": false, "collapsable": true, "panels": [ { "span": 12, "editable": true, "group": [ "default" ], "type": "histogram", "mode": "count", "time_field": "@timestamp", "value_field": null, "auto_int": true, "resolution": 100, "interval": "30s", "fill": 3, "linewidth": 3, "timezone": "browser", "spyable": true, "zoomlinks": true, "bars": true, "stack": true, "points": false, "lines": false, "legend": true, "x-axis": true, "y-axis": true, "percentage": false, "interactive": true, "queries": { "mode": "selected", "ids": [ 1, 2 ] }, "title": "Events over time", "intervals": [ "auto", "1s", "1m", "5m", "10m", "30m", "1h", "3h", "12h", "1d", "1w", "1M", "1y" ], "options": true, "tooltip": { "value_type": "cumulative", "query_as_alias": true }, "scale": 1, "y_format": "none", "grid": { "max": null, "min": 0 }, "annotate": { "enable": false, "query": "*", "size": 20, "field": "_type", "sort": [ "_score", "desc" ] }, "pointradius": 5, "show_query": true, "legend_counts": true, "zerofill": true, "derivative": false } ], "notice": false }, { "title": "", "height": "350px", "editable": true, "collapse": false, "collapsable": true, "panels": [ { "error": false, "span": 6, "editable": true, "type": "terms", "loadingEditor": false, "field": "request_query", "exclude": [], "missing": false, "other": false, "size": 10, "order": "count", "style": { "font-size": "10pt" }, "donut": false, "tilt": false, "labels": true, "arrangement": "horizontal", "chart": "pie", "counter_pos": "above", "spyable": true, "queries": { "mode": "all", "ids": [ 0, 1, 2, 3 ] }, "tmode": "terms", "tstat": "total", "valuefield": "" }, { "error": false, "span": 6, "editable": true, "type": "bettermap", "loadingEditor": false, "field": "client_geoip.location", "size": 1000, "spyable": true, "tooltip": "_id", "queries": { "mode": "selected", "ids": [ 3 ] } } ], "notice": false }, { "title": "Events", "height": "350px", "editable": true, "collapse": false, "collapsable": true, "panels": [ { "title": "All events", "error": false, "span": 12, "editable": true, "group": [ "default" ], "type": "table", "size": 100, "pages": 5, "offset": 0, "sort": [ "@timestamp", "desc" ], "style": { "font-size": "9pt" }, "overflow": "min-height", "fields": [], "localTime": true, "timeField": "@timestamp", "highlight": [], "sortable": true, "header": true, "paging": true, "spyable": true, "queries": { "mode": "all", "ids": [ 0, 1, 2, 3 ] }, "field_list": true, "status": "Stable", "trimFactor": 300, "normTimes": true, "all_fields": false } ], "notice": false } ], "editable": true, "failover": false, "index": { "interval": "day", "pattern": "[logstash-]YYYY.MM.DD", "default": "NO_TIME_FILTER_OR_INDEX_PATTERN_NOT_MATCHED", "warm_fields": true }, "style": "light", "panel_hints": true, "pulldowns": [ { "type": "query", "collapse": false, "notice": false, "query": "*", "pinned": true, "history": [ "client_geoip.country_code2:DE OR client_geoip.country_code2:AT OR client_geoip.country_code2:CH", "request:autocomplete.php", "request:index.php", "*" ], "remember": 10, "enable": true }, { "type": "filtering", "collapse": false, "notice": true, "enable": true } ], "nav": [ { "type": "timepicker", "collapse": false, "notice": false, "status": "Stable", "time_options": [ "5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d" ], "refresh_intervals": [ "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "timefield": "@timestamp", "now": false, "filter_id": 0, "enable": true } ], "loader": { "save_gist": false, "save_elasticsearch": true, "save_local": true, "save_default": true, "save_temp": true, "save_temp_ttl_enable": true, "save_temp_ttl": "30d", "load_gist": true, "load_elasticsearch": true, "load_elasticsearch_size": 20, "load_local": true, "hide": false }, "refresh": false } Vergrößern zum Anzeigen