4. What’s Fluentd?
> Data collector for unified logging layer
> Streaming data transfer based on JSON
> Written in Ruby
> Gem based various plugins
> http://www.fluentd.org/plugins
> Working in production
> http://www.fluentd.org/testimonials
11. v0.10 (old stable)
> Mainly for log forwarding
> with good performance
> working in production
> http://www.fluentd.org/testimonials
> Various plugins
> http://www.fluentd.org/plugins
14. > Apply filtering routine to event stream
> No more tag tricks!
Filter
<match access.**>
type record_reformer
tag reformed.${tag}
</match>
!
<match reformed.**>
type growthforecast
</match>
<filter access.**>
type record_transformer
…
</filter>
v0.10: v0.12:
<match access.**>
type growthforecast
</match>
15. > Internal event routing
> Redirect events to another group
> much easier to group and share plugins
Label
<source>
type forward
</source>
!
<match app1.**>
type record_reformer
</match>
!
…
<source>
type forward
@label @APP1
</source>
<label @APP1>
<match access.**>
type s3
</match>
</label>
v0.10: v0.12:
16. Error stream with Label
> Can handle an error at each record level
> It is still prototype
ERROR!
{"event":1, ...}
{"event":2, ...}
{"event":3, ...}
chunk1
{"event":4, ...}
{"event":5, ...}
{"event":6, ...}
chunk2
…
Input
OK
ERROR!
OK
OK
OK
Output
<label @ERROR>
<match **>
type file
...
</match>
</label>
Error stream
Built-in @ERROR is used
when error occurred in “emit”
17. v0.14 (next stable)
> New plugin APIs
> Actor
> New base classes (#309)
> ServerEngine based engine
> Robust supervisor
> Sub-second time support (#461)
> Zero downtime restart
18. Actor
> Easy to write popular routines
> Hide implementation details
class TimerWatcher <
Coolio::TimerWatcher
...
end
!
def start
@loop = Coolio::Loop.new
@timer = ...
@loop.attach(@timer)
@thread = ...
end
def configure(conf)
actor.every(@interval) {
router.emit(...)
}
end
!
def start
actor.start
end
v10: v0.14:
19. > Socket manager shared resources with
workers
19
Supervisor
TCP
1. Listen to TCP socket
Zero downtime restart
21. 21
Worker
Supervisor
Worker
TCP
TCP
1. Listen to TCP socket
2. Pass its socket to worker
3. Do same action
at worker restarting
with keeping TCP socket
heartbeat
Zero downtime restart
> Socket manager shared resources with
workers
TODO: How to implement on JRuby?
22. v1 (future stable)
> Fix new features / APIs
> Plugin APIs
> Default configurations
> Clear versioning and stability
> No breaking API compatibility!
> Breaking compatibility by Fluentd v2 ?
24. Other TODO
> Windows support
> Need feedback!
> https://github.com/fluent/fluentd/tree/windows
> Also check: http://qiita.com/okahashi117
> JRuby support
> msgpack / cool.io now work on JRuby
> https://github.com/fluent/fluentd/issues/317
26. Treasure Agent (td-agent)
> Treasure Data distribution of Fluentd
> Treasure Agent 2 is current stable
> Update core components
> We recommend to use v2, not v1
> Next version, 2.1.4, uses fluentd v0.12
> In this week or next week
27. fluentd-forwarder
> Forwarding agent written in Go
> Focusing log forwarding to Fluentd
> Work on Windows
> Bundle TCP input/output and TD output
> No flexible plugin mechanizm
> We have a plan to add some input/output
> Need feedback!