SlideShare ist ein Scribd-Unternehmen logo
1 von 53
Downloaden Sie, um offline zu lesen
L'ODYSSÉE DE LA LOG
1
QUI ?
@gerald_quintana
2
ITINÉRAIRE
3 . 1
DONNÉES TEMPORELLES
Logs
Mesures
Evénements
(2017-04-20 18:17:16, Data)
3 . 2
COLLECTER
Applica ons
Agents
3 . 3
STOCKER
Bases de données
Système de fichier
Cloud
3 . 4
POUR COMMENCER
Collecter Stocker
3 . 5
TRANSFORMER, FILTRER, ENRICHIR
Logs processing
Stream processing
3 . 6
POUR CONTINUER
Collecter Transformer Stocker
3 . 7
TRANSPORTER, BUFFERISER
3 . 8
TRANSPORTER, BUFFERISER
Aler ng, SIEM...?
3 . 9
POUR FINIR
Collecter Bufferiser Transformer Stocker
3 . 10
COLLECTER
4 . 1
LOG
2017-03-20 22:42:03 [main] INFO Bonjour à tous
4 . 2
FORMAT
{
"@timestamp":"2017-03-20T22:42:03.522+01:00",
"logger":"mixit",
"level":"INFO",
"message":"Bonjour à tous",
"thread":"main",
"host":"laptop-gerald",
"user":"gerald",
"transactionid": 4567,
"talk":"log-odyssey"
}
4 . 3
EMISSION
Fichier vs TCP/UDP
4 . 4
APPLICATIONS & JSON
...
4 . 5
APPLICATIONS & KAFKA
... →
4 . 6
BEATS & JSON
filebeat.prospectors:
- input_type: log
document_type: logback
paths:
- /var/log/log-odyssey/application.*.log
json:
keys_under_root: true
output.elasticsearch:
hosts: ["elasticsearch:9200"]
4 . 7
BEATS & KAFKA
filebeat.prospectors:
- input_type: log
...
output.kafka:
hosts: ["kafka:9092"]
topic: logstash
4 . 8
DOCKER
--log-driver=json-file|syslog|gelf|fluentd|splunk...
4 . 9
TRANSPORTER
5 . 1
KAFKA
5 . 2
PRODUCER / BROKER / CONSUMER
5 . 3
MESSAGE / RECORD
Key Value TS
5 . 4
PRODUCER
n1
n2
n3
5 . 5
PARTITIONNEMENT
5 . 6
BEATS & KAFKA
filebeat.prospectors:
- input_type: log
...
output.kafka:
hosts: ["kafka:9092"]
topic: logstash
partition.round_robin:
reachable_only: false
5 . 7
CONSUMER
n1
n2
n3
5 . 8
COMMITFAILEDEXCEPTION
CommitFailedException: Commit cannot be completed since the group has already
rebalanced and assigned the partitions to another member.
5 . 9
EQUILIBRAGE DES CONSUMERS
<[... 14:27:40,752] ...: Preparing to restabilize group logstash with old generation 0>
<[... 14:27:40,753] ...: Stabilized group logstash generation 1>
<[... 14:27:40,773] ...: Assignment received from leader for group logstash for generation
<[... 14:27:48,243] ...: Preparing to restabilize group logstash with old generation 1>
<[... 14:27:49,837] ...: Stabilized group logstash generation 2>
<[... 14:27:49,845] ...: Assignment received from leader for group logstash for generation
<[... 14:27:54,969] ...: Preparing to restabilize group logstash with old generation 2>
<[... 14:27:56,621] ...: Stabilized group logstash generation 3>
5 . 10
CONSUMER
n3
poll
commit
subscribe
session.timeout.ms
partition.max.fetch.size max.poll.records
5 . 11
PROTOCOLE
EOFException: null at o.a.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:
SchemaException: Error reading field 'throttle_time_ms': java.nio.BufferUnderflowException
InvalidRequestException: Error getting request for apiKey: 3 and apiVersion: 2
5 . 12
PROTOCOLE
Version Client ≤ Version Serveurs
h p://ka a.apache.org/protocol.html
5 . 13
FILTRER, TRANSFORMER
6 . 1
PIPELINE LOGSTASH
filterinput output
6 . 2
CONFIGURATION
input {
kafka {
bootstrap_servers => "kafka:9092"
codec => json
topics => ["logstash"]
}
}
filter {
if [type] == "jetty" {
grok {
match => { "message" =>
"%{COMBINEDAPACHELOG} (?:%{NUMBER:latency:int}|-)" }
}
date {
match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
6 . 3
KAFKA INPUT/OUTPUT
Ka a Logstash Plugin
0.8 2.0 - 2.x <3.0
0.9 2.0 - 2.3 3.x
0.9 2.4 - 5.x 4.x
0.10.0 2.4 - 5.x 5.x
0.10.1 2.4 - 5.x 6.x
6 . 4
PIPELINE LOGSTASH
input
input
batcher filterfilter output
batcher filterfilter output
pipeline.workers -w
pipeline.batch.size -b
6 . 5
MONITORER
6 . 6
MONITORER
filter {
ruby {
init => "require 'time'"
code => "start_time=Time.now.to_f*1000.0;
event.set('[@metadata][start_time]', start_time);"
}
# Filtrage
#....
ruby {
init => "require 'time'"
code => "end_time=Time.now.to_f=1000.0;
start_time=event.get('[@metadata][start_time]');
event.set('[logstash_duration]', end_time - start_time)"
}
metrics
6 . 7
MONITORER
6 . 8
PIPELINE ELASTICSEARCH
PUT _ingest/pipeline/jetty
{ "description": "Jetty Access Logs",
"processors": [
{ "grok": {
"field": "message",
"patterns": [
"%{COMBINEDAPACHELOG} (?:%{NUMBER:latency:int}|-)" ] } },
{ "date": {
"field": "timestamp",
"formats": [
"dd/MMM/yyyy:HH:mm:ss Z" ] } },
{ "date_index_name": {
"field": "@timestamp",
"index_name_prefix": "logs-",
"date_rounding" : "d" } }
6 . 9
STOCKER
7 . 1
ELASTICSEARCH
7 . 2
SCHEMALESS ?
Normaliser les champs
7 . 3
MAPPINGS
{ "jetty": {
"properties": {
"champ": {
"type": "text|keyword|integer|...",
"index": false?,
"norms": false?
} },
"_all": { "enabled": false }
} }
7 . 4
ROUTING & MAPPING
bulk
map
7 . 5
WRITES
segment
refresh
buffer
translog segment
flush
segment
...
index.refresh_interval 1s
index.translog.flush_threshold_size 512mb
7 . 6
index.merge.scheduler.max_thread_count CPU/2
MERGES
7 . 7
ARRIVÉE
8 . 1
QUESTIONS
?
8 . 2
MERCI
@gerald_quintana
8 . 3

Weitere ähnliche Inhalte

Was ist angesagt?

Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
Mu Chun Wang
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
Tony Fabeen
 

Was ist angesagt? (20)

NodeJS "Web en tiempo real"
NodeJS "Web en tiempo real"NodeJS "Web en tiempo real"
NodeJS "Web en tiempo real"
 
Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
 
Павел Филонов, Разделяй и управляй вместе с Conan.io
Павел Филонов, Разделяй и управляй вместе с Conan.ioПавел Филонов, Разделяй и управляй вместе с Conan.io
Павел Филонов, Разделяй и управляй вместе с Conan.io
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
 
Reflink
ReflinkReflink
Reflink
 
OpenCanary and Canary Tokens
OpenCanary and Canary TokensOpenCanary and Canary Tokens
OpenCanary and Canary Tokens
 
Advanced Replication
Advanced ReplicationAdvanced Replication
Advanced Replication
 
톰캣 #09-쓰레드
톰캣 #09-쓰레드톰캣 #09-쓰레드
톰캣 #09-쓰레드
 
What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?What Have Syscalls Done for you Lately?
What Have Syscalls Done for you Lately?
 
Hackerspace PostgreSQL Atolyesi - 3
Hackerspace PostgreSQL Atolyesi - 3Hackerspace PostgreSQL Atolyesi - 3
Hackerspace PostgreSQL Atolyesi - 3
 
Web sockets
Web socketsWeb sockets
Web sockets
 
От sysV к systemd
От sysV к systemdОт sysV к systemd
От sysV к systemd
 
Subversion To Mercurial
Subversion To MercurialSubversion To Mercurial
Subversion To Mercurial
 
skipfish
skipfishskipfish
skipfish
 
One Click Ownage
One Click OwnageOne Click Ownage
One Click Ownage
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
 
3 manual installation of open vpn
3 manual installation of open vpn3 manual installation of open vpn
3 manual installation of open vpn
 
tit
tittit
tit
 
Syslog Centralization Logging with Windows ~ A techXpress Guide
Syslog Centralization Logging with Windows ~ A techXpress GuideSyslog Centralization Logging with Windows ~ A techXpress Guide
Syslog Centralization Logging with Windows ~ A techXpress Guide
 
Mongo db tailable cursors
Mongo db tailable cursorsMongo db tailable cursors
Mongo db tailable cursors
 

Ähnlich wie L'odyssée de la log

Сергей Сверчков и Виталий Руденя. Choosing a NoSQL database
Сергей Сверчков и Виталий Руденя. Choosing a NoSQL databaseСергей Сверчков и Виталий Руденя. Choosing a NoSQL database
Сергей Сверчков и Виталий Руденя. Choosing a NoSQL database
Volha Banadyseva
 
Fatkulin presentation
Fatkulin presentationFatkulin presentation
Fatkulin presentation
Enkitec
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
Sidney Chen
 

Ähnlich wie L'odyssée de la log (20)

Сергей Сверчков и Виталий Руденя. Choosing a NoSQL database
Сергей Сверчков и Виталий Руденя. Choosing a NoSQL databaseСергей Сверчков и Виталий Руденя. Choosing a NoSQL database
Сергей Сверчков и Виталий Руденя. Choosing a NoSQL database
 
Centralized logging for (java) applications with the elastic stack made easy
Centralized logging for (java) applications with the elastic stack   made easyCentralized logging for (java) applications with the elastic stack   made easy
Centralized logging for (java) applications with the elastic stack made easy
 
1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster1 m+ qps on mysql galera cluster
1 m+ qps on mysql galera cluster
 
Building a fully-automated Fast Data Platform
Building a fully-automated Fast Data PlatformBuilding a fully-automated Fast Data Platform
Building a fully-automated Fast Data Platform
 
Building a fully-automated Fast Data Platform
Building a fully-automated Fast Data PlatformBuilding a fully-automated Fast Data Platform
Building a fully-automated Fast Data Platform
 
Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm
 
NATS + Docker meetup talk Oct - 2016
NATS + Docker meetup talk Oct - 2016NATS + Docker meetup talk Oct - 2016
NATS + Docker meetup talk Oct - 2016
 
Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and SwarmSimple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm
 
Restfs internals
Restfs internalsRestfs internals
Restfs internals
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
 
tdc2012
tdc2012tdc2012
tdc2012
 
Fatkulin presentation
Fatkulin presentationFatkulin presentation
Fatkulin presentation
 
Cassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, OverviewCassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, Overview
 
Passbolt Introduction and Usage for secret managment
Passbolt Introduction and Usage for secret managmentPassbolt Introduction and Usage for secret managment
Passbolt Introduction and Usage for secret managment
 
What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...What you wanted to know about MySQL, but could not find using inernal instrum...
What you wanted to know about MySQL, but could not find using inernal instrum...
 
HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
 
Scaling your logging infrastructure using syslog-ng
Scaling your logging infrastructure using syslog-ngScaling your logging infrastructure using syslog-ng
Scaling your logging infrastructure using syslog-ng
 
Scaling Your Logging Infrastructure With Syslog-NG
Scaling Your Logging Infrastructure With Syslog-NGScaling Your Logging Infrastructure With Syslog-NG
Scaling Your Logging Infrastructure With Syslog-NG
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

L'odyssée de la log