More Related Content Similar to Fluentd - Flexible, Stable, Scalable (20) Fluentd - Flexible, Stable, Scalable4. What is Fluentd?
• Fluentd is an open source data collector, which
lets you unify the data collection and
consumption for a better use and understanding
of data.
• Treasure Data: td-agent
5. What is Fluentd?
• Fluentd is an open source data collector, which
lets you unify the data collection and
consumption for a better use and understanding
of data.
• Treasure Data: td-agent
11. input: tail
$
cat
/etc/td-‐agent/conf.d
<source>
type
tail
path
/var/log/nginx/access.log
pos_file
/var/log/td-‐agent/httpd-‐access.log.pos
tag
nginx.access
</source>
<match
nginx.access>
blah
blah
</match>
12. input: forward
$
cat
/etc/td-‐agent/conf.d
<source>
type
forward
port
24224
</source>
<match
flask.index>
blah
blah
</match>
13. input: forward
$
cat
~/example.py
from
fluent
import
sender
from
fluent
import
event
sender.setup('flask',
host='localhost',
port=24224)
event.Event("index",
{
"user":
"foo",
"token":
"bar",
"action":
"POST"
})
15. output: elasticsearch
$
cat
/etc/td-‐agent/conf.d
<source>
foo
bar
tag
nginx.access
</source>
<match
nginx.access>
type
elasticsearch
hosts
es-‐host1,es-‐host2
index_name
nginx
type_name
access
flush_interval
60s
</match>
16. output: splunk
$
cat
/etc/td-‐agent/conf.d
<source>
foo
bar
tag
nginx.access
</source>
<match
nginx.access>
type
splunk
hosts
splunk-‐host1
</match>
19. Buffer example
$
cat
/etc/td-‐agent/conf.d
<source>
foo
bar
tag
nginx.access
</source>
<match
nginx.access>
type
splunk
hosts
splunk-‐host1
buffer_chunk_limit
10m
buffer_queue_limit
1000
flush_interval
5m
</match>
27. Idempotent
• HTTP PUT
• Maintain a unique id in application level or
• Concatenate (instance-id, time, ….) as id