logonomics

52
LOGONOMICS: The Hidden Side of Blackboard Logs by steve feldman @PerfForensics

Upload: steve-feldman

Post on 23-Jan-2015

777 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Logonomics

LOGONOMICS:  The  Hidden  Side  of  Blackboard  Logs    by  steve  feldman  @PerfForensics  

Page 2: Logonomics

Logging  Doesn’t  Suck  

Page 3: Logonomics
Page 4: Logonomics
Page 5: Logonomics

It’s  Like  Fishing  in  the  Night…  

Page 6: Logonomics
Page 7: Logonomics
Page 8: Logonomics

So  Why  Don’t  We  Talk  About  Logs  More  OJen?  

Page 9: Logonomics

At  least  20%  of  all  people  in  this  room  don’t  know  where  to  find  their  logs.  

Page 10: Logonomics

At  least  50%  of  all  people  in  this  room  don’t  look  at  their  logs.  

Page 11: Logonomics

At  least  60%  of  all  people  in  this  room  don’t  visualize  their  log  data.  

Page 12: Logonomics

At  least  75%  of  all  people  in  this  room  don’t  correlate  data  between  logs.  

Page 13: Logonomics

At  least  90%  of  all  people  in  this  room  don’t  standardize  the  management  of  

logs  to  a  centralized  service.  

Page 14: Logonomics

At  least  95%  of  all  people  in  this  room  don’t  alert  IT  staff  based  on  a  specific  

log  event.  

Page 15: Logonomics

If  a  System  Doesn’t  Output  to  a  Log  Do  We  Assume  Nobody  is  Using  it?  

Page 16: Logonomics

If  a  System  ConZnuously  Spews  Data  to  a  Log  Do  We  Ignore  it?  

Page 17: Logonomics
Page 18: Logonomics

What  We  Can  Do  With  Our  Log  Data  LOGONOMICS:  The  Hidden  Side  of    Blackboard  Logs    

Page 19: Logonomics

Trending  and  Intelligence    

Service  Levels    

Threats  and  VulnerabiliZes    

Responsiveness    Reliability  

 

Page 20: Logonomics

Primer  Data  Points  Everyone  Should  Know  

Unique  Requests  

Time  Series  of  Requests  

ConcentraZon  of  Request  Types  

Origin  of  Requests  

Quick  Averages  

Cascading  Issues  Across  Logs  

Page 21: Logonomics

Combining  Other  Data  with  Log  Data  

CorrelaZon  

Root  Cause  

InterpretaZon  

CompleZon  of  Message  

Full  Picture  Sequence  and  Timelines  

Page 22: Logonomics

Types  of  Data  We  Can  Get  LOGONOMICS:  The  Hidden  Side  of  Blackboard  Logs    

Page 23: Logonomics

Business  AnalyZcs:  AdopZon  and  Growth  

Page 24: Logonomics

System  Health  

Page 25: Logonomics

Capacity  Planning  

Page 26: Logonomics

Security  and  Threat  Analysis  

Page 27: Logonomics

Quality  and  Experience:  MeeZng  SLAs  

Page 28: Logonomics

Replay  and  Benchmarking  

Page 29: Logonomics

Insight  into  the  BbLogs  LOGONOMICS:  The  Hidden  Side  of  Blackboard  Logs    

Page 30: Logonomics

Four  Horseman  of  Logs  

Page 31: Logonomics

Bablefield  of  Other  Logs  

•  AuthenZcaZon  •  Plugins  Directory  •  NauZlus  for  events  •  Monitoring  (System  Logs)  – Syslogs  and  Rsyslogs  (/var/messages)  – Windows  Event  Logs  

Page 32: Logonomics

Is  there  a  Most  Important  Log?  

Page 33: Logonomics

Access  Log  

Log  Formafng  Mabers  Log  Levels    (INFO,  WARN,  ERROR)  

mod_log_forensic  

Use  %k,  %T  and  %D  

Decompose  the  URI  

Log  Formafng  Mabers  

Page 34: Logonomics

Is  there  a  2nd  Most  Important  Log?  

Page 35: Logonomics

Tomcat  and  Java  Logs  

Stack  Traces  Startup  OpZons  

GC  Events  

GC  Pauses  and  Status  

Page 36: Logonomics

Tools  We  Should  Consider  LOGONOMICS:  The  Hidden  Side  of  Blackboard  Logs    

Page 37: Logonomics

It’s  All  About  the  Right  Fishing  Rod  

Page 38: Logonomics

CAT!

GREP!

TAIL!

SED!AWK!

SORT!

Page 39: Logonomics

GROK!

Page 40: Logonomics

SomeZmes  a  Net  is  Beber  to  Cast  

Page 41: Logonomics

Log  CentralizaZon  

Page 42: Logonomics

Please  Take  All  My  Logs    

Format  Lots  of  Log  Data    

Send  it  Down  the  River  

Page 43: Logonomics
Page 44: Logonomics

•  amqp  •  exec  •  file  •  gelf  •  redis  •  stdin  •  stomp  •  syslog  •  tcp  •  twiber  •  xmpp  •  zeromq  

•  amqp  •  elasZcsearch  •  elasZcsearch_

river  •  file  •  ganglia  •  gelf  •  graphite  •  internal  •  loggly  •  mongodb  •  nagios  

•  date  •  dns  •  gelfify  •  grep  •  grok  •  grokdisco

very  •  json  •  mulZline  •  mutate  •  split  

•  null  •  redis  •  statsd  •  stdout  •  stomp  •  tcp  •  websocket  •  xmpp  •  zabbix  •  zeromq  

Inputs   Filters   Outputs  

Page 45: Logonomics

Configure  Apache  for  JSON  log  

•  hbp://cookbook.logstash.net/recipes/apache-­‐json-­‐logs/  

Page 46: Logonomics

Configure  Tomcat  for  MulZ-­‐Line  Filter  

Page 47: Logonomics

Setup  Bb  to  feed  logstash  

Page 48: Logonomics
Page 49: Logonomics

What  We  Use  Logstash  

Log  AggregaZon  

Non-­‐FuncZonal  Requirements  

Event  NoZficaZon  

IntegraZon  with  Zabbix  

Kibana  Front-­‐End   Redis  Inputs  &  Outputs  

Indexing  

Page 50: Logonomics

Simple  Challenge  to  All  

•  Setup  Logstash  architecture  (All  Single  Node)  •  Start  shipping  basic  log  files  – Apache  2.X  access  log  or  IIS  web  server  log  – Tomcat  Catalina  log  file  

•  Output  results  to  statsD  (Etsy  Project)  – Simple  Use  Case:  IncremenZng  HTTP  codes  (200,  300,  400)  

•  Visualize  statsD  data  with  Graphite  

Page 51: Logonomics

Bonus  Challenge  to  All  

•  Take  the  Vagrant  VM  and  integrate  Logstash  shipper  with  configuraZon  files.  

•  Add  Postgres  support  (Development  Only)  •  Basic  syslog  funcZonality  for  CentOs  •  Custom  Log  Interface  for  a  B2  

Page 52: Logonomics

Let’s  Add-­‐on  to  the  IniZaZve  developer.blackboard.com