pivotal open source: using fluentd to gain insights into your logs

42
Fluentd: Towards Unified Logging Layer Kiyoto Tamura @kiyototamura Treasure Data, Inc.

Upload: kiyoto-tamura

Post on 16-Jul-2015

103 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Pivotal Open Source:  Using Fluentd to gain insights into your logs

Fluentd:Towards Unified Logging Layer

Kiyoto Tamura

@kiyototamura

Treasure Data, Inc.

Page 2: Pivotal Open Source:  Using Fluentd to gain insights into your logs
Page 3: Pivotal Open Source:  Using Fluentd to gain insights into your logs

• Fluentd maintainer &

community manager

• data nerd

• math nerd

• nerd

whoami

Page 4: Pivotal Open Source:  Using Fluentd to gain insights into your logs
Page 5: Pivotal Open Source:  Using Fluentd to gain insights into your logs

this talk isn’t about

Big Data

Page 6: Pivotal Open Source:  Using Fluentd to gain insights into your logs

it’s about

Log Data

Page 7: Pivotal Open Source:  Using Fluentd to gain insights into your logs

a motivating anecdote

Page 8: Pivotal Open Source:  Using Fluentd to gain insights into your logs

The life of

a data scientist

(me in 2009)

Page 9: Pivotal Open Source:  Using Fluentd to gain insights into your logs

http://cacm.acm.org/blogs/blog-cacm/169199-data-science-workflow-overview-and-challenges/fulltext

Page 10: Pivotal Open Source:  Using Fluentd to gain insights into your logs

Acquire Data (or so you think)

WUT!? Invalid UTF8?

Fix the encoding issue…

Yell at the engineers

Some columns are missing!?

Run the script…DIVISION

BY ZERO!!!

Page 11: Pivotal Open Source:  Using Fluentd to gain insights into your logs

Hmm…

Page 12: Pivotal Open Source:  Using Fluentd to gain insights into your logs

Logging.priority

=> :not_super_high

Page 13: Pivotal Open Source:  Using Fluentd to gain insights into your logs

analytics.priority

=> :very_high

Page 14: Pivotal Open Source:  Using Fluentd to gain insights into your logs

analytics.needs? :logs

=> true

Page 15: Pivotal Open Source:  Using Fluentd to gain insights into your logs

outage.priority

=> :super_high

Page 16: Pivotal Open Source:  Using Fluentd to gain insights into your logs

outage.needs? :logs

=> [“no”, “shit”]

Page 17: Pivotal Open Source:  Using Fluentd to gain insights into your logs

Metrics and Monitoring

(hint: you need logs)

Page 18: Pivotal Open Source:  Using Fluentd to gain insights into your logs
Page 19: Pivotal Open Source:  Using Fluentd to gain insights into your logs

Ops

VPs

Engineers

Managers

PMs

More PMs

Page 20: Pivotal Open Source:  Using Fluentd to gain insights into your logs
Page 21: Pivotal Open Source:  Using Fluentd to gain insights into your logs

How can we do better?

Page 22: Pivotal Open Source:  Using Fluentd to gain insights into your logs

How to Unify Logging (1)Common Interface + Decoupling

WebMobile IoT

Message Queue

Search Backend

Analytic DBArchival Storage

Unified Logging Layer

Parse into acommon data format

Decouple fromdata sources

Page 23: Pivotal Open Source:  Using Fluentd to gain insights into your logs

How to Unify Logging (2)Reliability & Scalability

WebMobile IoT

Message Queue

Search Backend

Analytic DBArchival Storage

Unified Logging Layer

Need persistence/buffering

Robust retriesand recovery

Page 24: Pivotal Open Source:  Using Fluentd to gain insights into your logs

How to Unify Logging (3)Extensibility

Web? IoT

? Search Backend

Analytic DBArchival Storage

Unified Logging Layer

Adding a new in/output must be easy

Same for filters

Page 25: Pivotal Open Source:  Using Fluentd to gain insights into your logs

Fluentd can help us unify logging

Page 26: Pivotal Open Source:  Using Fluentd to gain insights into your logs

how it works

Page 27: Pivotal Open Source:  Using Fluentd to gain insights into your logs
Page 28: Pivotal Open Source:  Using Fluentd to gain insights into your logs

127.0.0.1 - - [05/Feb/2012:17:11:55 +0000] "GET / HTTP/1.1" 200 140 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.5 Safari/535.19"

Page 29: Pivotal Open Source:  Using Fluentd to gain insights into your logs

{

"host": "127.0.0.1",

"user": "-",

"method": "GET",

"path": "/",

"code": "200",

"size": "140",

"referer": "-",

"agent": “Mozilla/5.0 (Windows…"

}

Page 30: Pivotal Open Source:  Using Fluentd to gain insights into your logs
Page 31: Pivotal Open Source:  Using Fluentd to gain insights into your logs

Parse as JSON!

Page 32: Pivotal Open Source:  Using Fluentd to gain insights into your logs

?

Page 33: Pivotal Open Source:  Using Fluentd to gain insights into your logs

[“05/Feb/2012:17:11:55”,“web.access”,{

"host": "127.0.0.1",

"user": "-",

"method": "GET",

"path": "/",

"code": "200",

"size": "140",

"referer": "-",

"agent": “Mozilla/5.0 (Windows…"

}]

timestamp tag

record

Page 34: Pivotal Open Source:  Using Fluentd to gain insights into your logs

?

Page 35: Pivotal Open Source:  Using Fluentd to gain insights into your logs

web.mongodb

web.file

web.hdfs

web.s3

web.mysql

Page 36: Pivotal Open Source:  Using Fluentd to gain insights into your logs

Demo: Bring Your Own A/B Testing

Page 37: Pivotal Open Source:  Using Fluentd to gain insights into your logs

How A/B Testing Starts

website

A/B Testing SaaS

<script>…</script>

Page 38: Pivotal Open Source:  Using Fluentd to gain insights into your logs

How A/B Testing Evolves

A/B Testing SaaS 1

<script>…</script>

website

A/B Testing SaaS 1

A/B Testing SaaS 1

A/B Testing SaaS 1

<script>…</script>

event.post()…

<script>…</script>

Android iOS

event.post()…

Page 39: Pivotal Open Source:  Using Fluentd to gain insights into your logs

How A/B Testing Evolves

A/B Testing SaaS 1

<script>…</script>

website

A/B Testing SaaS 1

A/B Testing SaaS 1

A/B Testing SaaS 1

<script>…</script>

event.post()…

<script>…</script>

Android iOS

event.post()…

Looks Familiar?

Page 40: Pivotal Open Source:  Using Fluentd to gain insights into your logs

Bring Your Own A/B Testing!

websiteAndroid iOS

A/B Testing SaaS 1

A/B Testing SaaS 2

Analytic DBArchival Storage

Page 41: Pivotal Open Source:  Using Fluentd to gain insights into your logs

bit.ly/cf-fluentd

Page 42: Pivotal Open Source:  Using Fluentd to gain insights into your logs

{

“install”: “gem install fluentd”,

“website”: “www.fluentd.org”,

“github” : “fluent/fluentd”,

“twitter”: “@fluentd”

}