Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Stack Elasticsearch - Matinale Zenika
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Nicolas Lassalle
December 15, 2016
Technology
0
180
Stack Elasticsearch - Matinale Zenika
Présentation de la stack elastic et du x-pack
Nicolas Lassalle
December 15, 2016
Tweet
Share
More Decks by Nicolas Lassalle
See All by Nicolas Lassalle
Présentation
orphaner
0
180
Other Decks in Technology
See All in Technology
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
220
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
670
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
1.9k
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
410
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
380
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.5k
Tebiki Engineering Team Deck
tebiki
0
24k
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
140
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
ファインディの横断SREがTakumi byGMOと取り組む、セキュリティと開発スピードの両立
rvirus0817
1
1.4k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
93k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
170
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
50k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
55
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
110
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Writing Fast Ruby
sferik
630
62k
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
How to train your dragon (web standard)
notwaldorf
97
6.5k
Transcript
Elastic Stack @EmmanuelDemey @NicolaZnk #elastic
None
None
Elasticsearch • Open source project • Based on Apache Lucene
• Add many features ◦ REST API ◦ High Availability ◦ Many Clients : Java, JavaScript, GO, Haskell, .net, ...
Elasticsearch • Search & Analytics: ◦ Full-text search ◦ Aggregations
◦ Geospatial ◦ Multilingual
Elasticsearch • Use cases: ◦ Single bar search ◦ Catalog
indexation ◦ Localized searches ◦ Logs management
Elasticsearch • Success stories: ◦ Ebay: 800 millions items ◦
Github: repositories code search ◦ Deezer: catalog 40m entries ◦ NYT: 15m articles since 160 years
Elasticsearch • Infrastructure: ◦ Start from 3 nodes, up to
? ◦ Add / remove nodes on the fly ◦ Heterogeneous servers ◦ Easy monitoring & supervision ◦ Modest hardware configuration
PUT http://localhost:9200/index/type/1 { "title": "Olivier Twist" } >> {“acknowledged”: true}
POST http://localhost:9200/index/type/ { "title": "Les Aventures de Monsieur Pickwick" } >> {“acknowledged”: true} GET http://localhost:9200/index/type/1 >> {“title”: “Olivier Twist”} PUT http://localhost:9200/index/type/2 { "title": "Oliver Twist" } >> {“acknowledged”: true} DELETE http://localhost:9200/index/type/2 >> {“acknowledged”: true} Elasticsearch
POST http://localhost:9200/index/type/_search { "query": "match" : { "title" : {
"query" : "OLIVER" } } } } >> { "hits": { "hits": [ { "_index": "index", "_type": "type", "_id": "1", "_score": 0.5, "_source": {"title": "Oliver Twist"} } ], ... } ... } Elasticsearch
POST http://localhost:9200/index/type/_search { "query": { "bool": { "must": [ {
"match": { "title": "Oliver" }}, { "match": { "author": "Dickens" }} ], "filter": [ { "term": { "status": "published" }}, { "range": { "publish_date": { "lte": "1950-01-01" }}} ] } } } Elasticsearch
None
Elasticsearch • Developped in java & jruby • Dynamic data
pipeline: ◦ Multiple input / output ◦ Centralize logs ◦ Parse ◦ Store / forward • Plugin based
Logstash Logs REST API Broker Unix commands Files REST API
Broker Elastic Search Filter 1 Filter 2 Filter 3
Logstash Logs REST API Broker Unix commands Files REST API
Broker Elastic Search Filter 1 Filter 2 Filter 3
Logstash # logstash -f logtash.conf input { } filter {
} output { } { } “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\"”, file { path => "/var/access*.log” } grok {match => { "message" => "%{COMMONAPACHELOG}" }} “clientip”: “127.0.0.1”, “verb”: “GET”, “request”: “/london”/, “response”: 200, ... if [request] == “/london” { mutate { add_field => { “inEnglish” => true } } “inEnglish”: true mutate { remove_field => [ "message" ] elasticsearch { hosts => [ “localhost:9200” ] }
Logstash
Logstash - Complex architecture Logs / App1 Files REST API
Broker Elastic Search Logstash 2 Kafka Logstash Logs / App2 Logs / App3 Logstash 3 Logstash 1
None
Beats • Stack developped with GO • More efficient (I/O,
…) than JRuby code • Easy to install / configure • TopBeat, PacketBeat, FileBeat, MetricBeat, WinlogBeat, ...
Logstash - Complex architecture Logs / App1 Files REST API
Broker Elastic Search Filebeat 2 Kafka Logstash Logs / App2 Logs / App3 Filebeat 3 Filebeat 1
# logstash -f logtash.conf input { } filter { }
output { } beats { port => 5044 } grok {match => { "message" => "%{COMMONAPACHELOG}" }} if [request] == “/london” { mutate { add_field => { “inEnglish” => true } } mutate { remove_field => [ "message" ] elasticsearch { hosts => [ “localhost:9200” ] } Beats # filebeat -c filebeat-conf.yml filebeat: prospectors: - paths: - "/var/access*.log” output: logstash: hosts: ["localhost:5044"]
Beats
None
Kibana
• Discover / Visualize / Dashboard • Many plugged-in widgets
◦ map, pie, metric, area chart, line chart, table… ◦ Many plugins available • Period selector and auto-refresh behaviors • Authentication Management System • PDF Report : automate & email Kibana
and many more products...
None
None
Security
• Define roles for you ES cluster • Many authentication
levels : ◦ cluster ◦ indices ◦ documents ◦ properties • Authentication Providers : Basic Auth, LDAP, Active Directory, your own provider Security
Security # PUT /_xpack/security/role/clicks_admin { "cluster": [ "monitor" ], "indices":
[ { "names": [ "events-*" ], "privileges": [ "read" ], "query": "{\"match\": {\"category\": \"click\"}}" } ] } # PUT /_xpack/security/user/manu { "password": "password", "roles": [ "clicks_admin"], "full_name": "Emmanuel Demey”, "email": "
[email protected]
”, "metadata": { "event": "Matinale ES" } } # role_mapping.yml monitoring: - "cn=admins,dc=example,dc=com" user: - "cn=John Doe,cn=contractors,dc=example,dc=com" - "cn=users,dc=example,dc=com" - "cn=admins,dc=example,dc=com"
• Encrypted communication between nodes • Encrypted access • IP
Filtering • Audit logging • Add authentication to Kibana and Monitoring Security
Alerting
• Detect changes in your data • Get notified •
Learn from alert history Alerting
PUT _xpack/watcher/watch/log_errors { "trigger" : { schedule" : { "interval"
: "5m" } }, "input" : { "search" : { "request" : { "indices" : "log-events", "body" : { "query" : { "match" : { "status" : "error" } } } } } }, ... ... "condition" : { "compare" : { "ctx.payload.hits.total" : { "gt" : 5 }} }, "actions" : { "email_administrator" : { "email" : { "to" : "
[email protected]
", "subject" : " {{ctx.payload.hits.total}} errors", "body" : "Too many error" } } } } } Alerting
Monitoring
Monitoring
Emmanuel DEMEY Zenika LILLE @EmmanuelDemey Nicolas LASSALLE Zenika LILLE @NicolaZnk