SlideShare une entreprise Scribd logo
1  sur  21
D i g i n s i g h t
LOG MINING
fanjiang@thoughtworks.com
https://github.com/tcz001
TECH RADAR TREND
2
structured-logging
什么是LOG?
3
> tail -f /usr/local/log
INFO [2014-11-13 12:23:36,173]
com.thoughtworks.forcetalk.resources.ContactResource:
Updated Contact
{"FirstName":"Alper","LastName":"Mermer","Employee_ID__c
":"16906","Email":"amermer@thoughtworks.com","Grade__c":
"Senior Consultant”}
ERROR [2014-11-13 11:45:33,892]
com.thoughtworks.forcetalk.validators.ForceQueryResultsVali
dator: Unable to retrieve Project for Opportunity with id:
0065000000TE2evAAD
INFO [2014-11-13 12:23:36,505]
com.thoughtworks.tetalk.resources.UserResource: Contact
Update Response SObjectResponse{successful=true, id='null',
errorMessage='null', errorField='null', errorCode='null'}
INFO 2014-11-13 12:23:36,173
com.thoughtworks.forcetalk.resources.ContactResource
ERROR
什么是好LOG?
4
▫ http://juliusdavies.ca/logging/llclc.html
Best Logs:
▫Tell you exactly what happened: when, where, and how.
▫Suitable for manual, semi-automated, or automated analysis.
▫Can be analysed without having the application that produced them at ha
▫Don't slow the system down.
▫Can be proven reliable (if used as evidence).
Avoid Logs:
▫Missing necessary information.
▫Unsuitable for grep because of redundant information.
▫Information split across more than one line (bad for grep).
▫Error reported to user, but not logged.
▫Never include any sensitive data.(for Security !).
DEVOPS的故事
5
> rm -rf ALL_THE_LOGS
DEVOPS的故事
6
We got an angry User! HELP!
BE REACTIVE
7
MONITOR IS FAR FROM
“TOP”
8
SAVE OUR LIFE
9
?
SAVE OUR LIFE
10
Splunk
saas
LogStash
opensource
OR
SAVE OUR LIFE
11
SAVE OUR LIFE
12
WHAT TIME IS IT?
1304060505
29/Apr/2011:07:05:26 +0000
Fri, 21 Nov 1997 09:55:06 -0600
Oct 11 20:21:47
020805 13:51:24 110429.071055,118
@4000000037c219bf2ef02e94
DATE FILTER FIXES THIS BULLSHIT
filter {
date {
# Turn 020805 13:51:24
# Into 2002-08-05T13:51:24.000Z
mysqltimestamp => "YYMMdd HH:mm:ss"
}
}
SAVE OUR LIFE
13
> 23 INPUTS | 18 FILTERS | 40 OUTPUTS
不只是timestamp
▫ LogLevel
▫ Source
▫ IP=> GeoHash
▫ Browser/Platform
SAVE OUR LIFE
14
Logstash-server
input {
lumberjack {
# The port to listen on
port => 5043
# The paths to your ssl cert and key
ssl_certificate => "./logstash.crt"
ssl_key => "./logstash.key"
# Set this to whatever you want.
type => "finance"
}
}
filter {
if [type] == "finance" {
grok {
match => [ "message",
"%{LOGLEVEL:loglevel}s+[%{TIMESTAMP_IS
mp}] (?<source>(w|.)+): (?<msg>(.*))" ]
add_tag => [ "grokked" ]
}
date {
match => [ "timestamp" , "yyyy-MM-dd HH
}
}
}
output {
if "_grokparsefailure" not in [tags] {
stdout { codec => rubydebug }
elasticsearch { host => localhost }
}
}
Logstash-forwarder
"network": {
"servers": [ "localhost:5043" ],
"ssl ca": "./logstash-forwarder.crt"
},
"files": [
{
"paths": [
"/usr/local/finance/**/logs/*.log"
],
"dead time" : "8760h",
"fields": { "type": "finance" }
}
]
All Our Services
ElasticSearch
Clusters
ELASTICSEARCH
15
▫ Restiful API search engine
▫ Multi-cluster supported
▫ Great community
▫ Use it! throw things into it!
ElasticSearch
+
Kibana
DIGGING DEEPER
16
curl -XGET 'http://localhost:9200/logstash-*/_search?pretty&search_type=count' -d '{
"aggregations": {
“source-aggregation”: {
"terms": {
"field": "source","size": 1000
}
}
}
}
'
Try it!
DIGGING DEEPER
17
http://localhost:8000/
Zoomable Treemap for diging into Logs via source
By Elasticsearch aggregation API
LEARN FROM LOG
18
treat Log as StatisticalData
AUTO REACTIVE
19
Be Responsive to every Exception
OTHER POSSIBILITY
20
Q&A
Thanks~
21

Contenu connexe

Tendances

c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
Swarup Kumar Boro
 
Doctype htm1
Doctype htm1Doctype htm1
Doctype htm1
Eddy_TKJ
 
Building Real Time Systems on MongoDB Using the Oplog at Stripe
Building Real Time Systems on MongoDB Using the Oplog at StripeBuilding Real Time Systems on MongoDB Using the Oplog at Stripe
Building Real Time Systems on MongoDB Using the Oplog at Stripe
MongoDB
 
Simple php backdoor_by_dk
Simple php backdoor_by_dkSimple php backdoor_by_dk
Simple php backdoor_by_dk
Stan Adrian
 

Tendances (20)

Sol 1
Sol 1Sol 1
Sol 1
 
Malcon2017
Malcon2017Malcon2017
Malcon2017
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Data mangling with mongo db the right way [pyconit 2016]
Data mangling with mongo db the right way [pyconit 2016]Data mangling with mongo db the right way [pyconit 2016]
Data mangling with mongo db the right way [pyconit 2016]
 
Binomial heap
Binomial heapBinomial heap
Binomial heap
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
 
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingDarkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
 
Chat code
Chat codeChat code
Chat code
 
Coding Horrors
Coding HorrorsCoding Horrors
Coding Horrors
 
computer project code ''payroll'' (based on datafile handling)
computer project code ''payroll'' (based on datafile handling)computer project code ''payroll'' (based on datafile handling)
computer project code ''payroll'' (based on datafile handling)
 
Representing Material Culture Online: Historic Clothing in Omeka
Representing Material Culture Online: Historic Clothing in OmekaRepresenting Material Culture Online: Historic Clothing in Omeka
Representing Material Culture Online: Historic Clothing in Omeka
 
Doctype htm1
Doctype htm1Doctype htm1
Doctype htm1
 
Building Real Time Systems on MongoDB Using the Oplog at Stripe
Building Real Time Systems on MongoDB Using the Oplog at StripeBuilding Real Time Systems on MongoDB Using the Oplog at Stripe
Building Real Time Systems on MongoDB Using the Oplog at Stripe
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !
 
The solution manual of c by robin
The solution manual of c by robinThe solution manual of c by robin
The solution manual of c by robin
 
Simple php backdoor_by_dk
Simple php backdoor_by_dkSimple php backdoor_by_dk
Simple php backdoor_by_dk
 
Fewer cables
Fewer cablesFewer cables
Fewer cables
 
An introduction to PHP 5.4
An introduction to PHP 5.4An introduction to PHP 5.4
An introduction to PHP 5.4
 
Bag of tricks
Bag of tricksBag of tricks
Bag of tricks
 
Quiz using C++
Quiz using C++Quiz using C++
Quiz using C++
 

Similaire à Log mining

Monitoring with Syslog and EventMachine (RailswayConf 2012)
Monitoring  with  Syslog and EventMachine (RailswayConf 2012)Monitoring  with  Syslog and EventMachine (RailswayConf 2012)
Monitoring with Syslog and EventMachine (RailswayConf 2012)
Wooga
 
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
CODE BLUE
 
OpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con PythonOpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con Python
PyCon Italia
 
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
doughellmann
 

Similaire à Log mining (20)

Monitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachineMonitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachine
 
Monitoring with Syslog and EventMachine (RailswayConf 2012)
Monitoring  with  Syslog and EventMachine (RailswayConf 2012)Monitoring  with  Syslog and EventMachine (RailswayConf 2012)
Monitoring with Syslog and EventMachine (RailswayConf 2012)
 
Self scaling Multi cloud nomad workloads
Self scaling Multi cloud nomad workloadsSelf scaling Multi cloud nomad workloads
Self scaling Multi cloud nomad workloads
 
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
 
Tools for Solving Performance Issues
Tools for Solving Performance IssuesTools for Solving Performance Issues
Tools for Solving Performance Issues
 
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
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
 
Uncomplicated Nomad
Uncomplicated NomadUncomplicated Nomad
Uncomplicated Nomad
 
Best Practices in Handling Performance Issues
Best Practices in Handling Performance IssuesBest Practices in Handling Performance Issues
Best Practices in Handling Performance Issues
 
OpenStack Log Mining
OpenStack Log MiningOpenStack Log Mining
OpenStack Log Mining
 
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
 
OpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con PythonOpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con Python
 
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
 
Laura Garcia - Shodan API and Coding Skills [rooted2019]
Laura Garcia - Shodan API and Coding Skills [rooted2019]Laura Garcia - Shodan API and Coding Skills [rooted2019]
Laura Garcia - Shodan API and Coding Skills [rooted2019]
 
Semantic Web & TYPO3
Semantic Web & TYPO3Semantic Web & TYPO3
Semantic Web & TYPO3
 
Osol Pgsql
Osol PgsqlOsol Pgsql
Osol Pgsql
 
Kamailio - SIP Firewall for Carrier Grade Traffic
Kamailio - SIP Firewall for Carrier Grade TrafficKamailio - SIP Firewall for Carrier Grade Traffic
Kamailio - SIP Firewall for Carrier Grade Traffic
 
How to send gzipped requests with boto3
How to send gzipped requests with boto3How to send gzipped requests with boto3
How to send gzipped requests with boto3
 
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...How I Built a Power Debugger Out of the Standard Library and Things I Found o...
How I Built a Power Debugger Out of the Standard Library and Things I Found o...
 
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, EverAltitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
Altitude NY 2018: Leveraging Log Streaming to Build the Best Dashboards, Ever
 
GraphQL Bangkok Meetup 2.0
GraphQL Bangkok Meetup 2.0GraphQL Bangkok Meetup 2.0
GraphQL Bangkok Meetup 2.0
 

Dernier

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Dernier (20)

Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

Log mining

  • 1. D i g i n s i g h t LOG MINING fanjiang@thoughtworks.com https://github.com/tcz001
  • 3. 什么是LOG? 3 > tail -f /usr/local/log INFO [2014-11-13 12:23:36,173] com.thoughtworks.forcetalk.resources.ContactResource: Updated Contact {"FirstName":"Alper","LastName":"Mermer","Employee_ID__c ":"16906","Email":"amermer@thoughtworks.com","Grade__c": "Senior Consultant”} ERROR [2014-11-13 11:45:33,892] com.thoughtworks.forcetalk.validators.ForceQueryResultsVali dator: Unable to retrieve Project for Opportunity with id: 0065000000TE2evAAD INFO [2014-11-13 12:23:36,505] com.thoughtworks.tetalk.resources.UserResource: Contact Update Response SObjectResponse{successful=true, id='null', errorMessage='null', errorField='null', errorCode='null'} INFO 2014-11-13 12:23:36,173 com.thoughtworks.forcetalk.resources.ContactResource ERROR
  • 4. 什么是好LOG? 4 ▫ http://juliusdavies.ca/logging/llclc.html Best Logs: ▫Tell you exactly what happened: when, where, and how. ▫Suitable for manual, semi-automated, or automated analysis. ▫Can be analysed without having the application that produced them at ha ▫Don't slow the system down. ▫Can be proven reliable (if used as evidence). Avoid Logs: ▫Missing necessary information. ▫Unsuitable for grep because of redundant information. ▫Information split across more than one line (bad for grep). ▫Error reported to user, but not logged. ▫Never include any sensitive data.(for Security !).
  • 6. DEVOPS的故事 6 We got an angry User! HELP!
  • 8. MONITOR IS FAR FROM “TOP” 8
  • 12. SAVE OUR LIFE 12 WHAT TIME IS IT? 1304060505 29/Apr/2011:07:05:26 +0000 Fri, 21 Nov 1997 09:55:06 -0600 Oct 11 20:21:47 020805 13:51:24 110429.071055,118 @4000000037c219bf2ef02e94 DATE FILTER FIXES THIS BULLSHIT filter { date { # Turn 020805 13:51:24 # Into 2002-08-05T13:51:24.000Z mysqltimestamp => "YYMMdd HH:mm:ss" } }
  • 13. SAVE OUR LIFE 13 > 23 INPUTS | 18 FILTERS | 40 OUTPUTS 不只是timestamp ▫ LogLevel ▫ Source ▫ IP=> GeoHash ▫ Browser/Platform
  • 14. SAVE OUR LIFE 14 Logstash-server input { lumberjack { # The port to listen on port => 5043 # The paths to your ssl cert and key ssl_certificate => "./logstash.crt" ssl_key => "./logstash.key" # Set this to whatever you want. type => "finance" } } filter { if [type] == "finance" { grok { match => [ "message", "%{LOGLEVEL:loglevel}s+[%{TIMESTAMP_IS mp}] (?<source>(w|.)+): (?<msg>(.*))" ] add_tag => [ "grokked" ] } date { match => [ "timestamp" , "yyyy-MM-dd HH } } } output { if "_grokparsefailure" not in [tags] { stdout { codec => rubydebug } elasticsearch { host => localhost } } } Logstash-forwarder "network": { "servers": [ "localhost:5043" ], "ssl ca": "./logstash-forwarder.crt" }, "files": [ { "paths": [ "/usr/local/finance/**/logs/*.log" ], "dead time" : "8760h", "fields": { "type": "finance" } } ] All Our Services ElasticSearch Clusters
  • 15. ELASTICSEARCH 15 ▫ Restiful API search engine ▫ Multi-cluster supported ▫ Great community ▫ Use it! throw things into it! ElasticSearch + Kibana
  • 16. DIGGING DEEPER 16 curl -XGET 'http://localhost:9200/logstash-*/_search?pretty&search_type=count' -d '{ "aggregations": { “source-aggregation”: { "terms": { "field": "source","size": 1000 } } } } ' Try it!
  • 17. DIGGING DEEPER 17 http://localhost:8000/ Zoomable Treemap for diging into Logs via source By Elasticsearch aggregation API
  • 18. LEARN FROM LOG 18 treat Log as StatisticalData
  • 19. AUTO REACTIVE 19 Be Responsive to every Exception