Top Banner
FLUENTD: UNIFIED LOGGING LAYER Kiyoto Tamura July 23, 2015 Silicon Valley Data Engineering Meetup
31
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Fluentd -  Unified logging layer

FLUENTD: UNIFIED LOGGING LAYER

Kiyoto TamuraJuly 23, 2015

Silicon Valley Data Engineering Meetup

Page 2: Fluentd -  Unified logging layer

WHOAMI

Kiyoto TamuraGitHub/Twitter: kiyoto/kiyototamura

Treasure Data, Inc.Vice President, MarketingTRUST ME, I used to code daily =)

Page 3: Fluentd -  Unified logging layer

Tweet NOW!“At #svde learning how to collect more event data using #Fluentd”

Page 4: Fluentd -  Unified logging layer

WHAT’S FLUENTD?

An extensible & reliable data collection tool

simple core + plugins

buffering, HA (failover),load balancing, etc.

like syslogd

Page 5: Fluentd -  Unified logging layer

data collection tool

Page 6: Fluentd -  Unified logging layer

✓ duplicated code for error handling...✓ messy code for retrying mechnism...

Blueflood

MongoDB

Hadoop

Metrics

Amazon S3

Analysis

Archiving

MySQL

Apache

Frontend

Access logs

syslogd

App logs

System logs

Backend

Your system

bash scripts ruby scripts

rsync

log file

bash

python scripts

customloggger

cron

other customscripts...

Page 7: Fluentd -  Unified logging layer

(this is painful!!!)

Page 8: Fluentd -  Unified logging layer

Blueflood

MongoDB

Hadoop

Metrics

Amazon S3

Analysis

Archiving

MySQL

Apache

Frontend

Access logs

syslogd

App logs

System logs

Backend

Your systemfilter / buffer / route

Page 9: Fluentd -  Unified logging layer

extensible

Page 10: Fluentd -  Unified logging layer

CORE PLUGINS• Divide & Conquer• Buffering & Retries• Error Handling• Message Routing• Parallelism

• Read Data• Parse Data• Buffer Data• Write Data• Format Data

CommonConcerns

Use CaseSpecific

Page 11: Fluentd -  Unified logging layer

architecture

Page 12: Fluentd -  Unified logging layer

INTERNAL ARCHITECTURE

“input-ish” “output-ish”

Input Parser Buffer Output FormatterFilter

Page 13: Fluentd -  Unified logging layer

reliable

Page 14: Fluentd -  Unified logging layer

reliable data transfer

Page 15: Fluentd -  Unified logging layer

DIVIDE & CONQUER & RETRY

error retry

error retry retry

retry

Page 16: Fluentd -  Unified logging layer

reliable process

Page 17: Fluentd -  Unified logging layer

THIS?

Page 18: Fluentd -  Unified logging layer

OR THIS?

Page 19: Fluentd -  Unified logging layer

M X N → M + N

Nagios

MongoDB

Hadoop

Alerting

Amazon S3

Analysis

Archiving

MySQL

Apache

Frontend

Access logs

syslogd

App logs

System logs

Backend

Databasesbuffer/filter/route

Page 20: Fluentd -  Unified logging layer

use cases

Page 21: Fluentd -  Unified logging layer

SIMPLE FORWARDING

Page 22: Fluentd -  Unified logging layer

# logs from a file<source> type tail path /var/log/httpd.log format apache2 tag backend.apache</source>

# logs from client libraries<source> type forward port 24224</source>

# store logs to ES and HDFS<match backend.*> type mongo database fluent collection test</match>

Page 23: Fluentd -  Unified logging layer

LESS SIMPLE FORWARDING

Page 24: Fluentd -  Unified logging layer

LAMBDA ARCHITECTURE

Page 25: Fluentd -  Unified logging layer

# logs from a file<source> type tail path /var/log/httpd.log format apache2 tag web.access</source>

# logs from client libraries<source> type forward port 24224</source>

# store logs to ES and HDFS<match backend.*> type copy

<store> type elasticsearch logstash_format true </store>

<store> type webhdfs host namenode port 50070 path /path/on/hdfs/ </store></match>

Page 26: Fluentd -  Unified logging layer

CEP FOR STREAM PROCESSING

Page 27: Fluentd -  Unified logging layer

FLUENTD ON KUBERNETES (NOV 2015)

Page 28: Fluentd -  Unified logging layer

FLUENTD LOGGING DRIVER (APR 2015)

Page 29: Fluentd -  Unified logging layer

Tweet Again!“Happy v1 #k8s and congrats #Fluentd for becoming a #docker logging driver”

Page 30: Fluentd -  Unified logging layer

DEMO: FLUENTD + DOCKER

Page 31: Fluentd -  Unified logging layer

THANK YOU!

AND TREASURE DATA IS HIRING!WWW.TREASUREDATA.COMC/CAREERS