@hai046
2016-01-27T10:10:48.000000Z
字数 2295
阅读 1211
flume
满足我们需求有
1,tail 监控日志
2,sdk支持传输输入日志
3,支持直接转换成hdfs
4,thrift数据源
等等
官方网站:http://flume.apache.org/
官方指导:http://flume.apache.org/FlumeUserGuide.html
支持数据源列表
Avro Source
Thrift Source
Exec Source
JMS Source
Converter
Spooling Directory Source
Event Deserializers
LINE
AVRO
BlobDeserializer
Twitter 1% firehose Source (experimental)
Kafka Source
NetCat Source
Sequence Generator Source
Syslog Sources
Syslog TCP Source
Multiport Syslog TCP Source
Syslog UDP Source
HTTP Source
JSONHandler
BlobHandler
Stress Source
Legacy Sources
Avro Legacy Source
Thrift Legacy Source
Custom Source
Scribe Source
在10.10.5.11:/opt/apache-flume 目录下
agent1.sources = source1agent1.sinks = sink1agent1.channels = channel1# Describe/configure tail -F source1agent1.sources.source1.type = execagent1.sources.source1.command = tail -F /data/log/jiemo-api/access.log#监控日志agent1.sources.source1.channels = channel1agent1.sources.source1.batchSize = 1#configure host for sourceagent1.sources.source1.interceptors = i1agent1.sources.source1.interceptors.i1.type = hostagent1.sources.source1.interceptors.i1.hostHeader = hostname# Describe avro sink1agent1.sinks.sink1.type = avroagent1.sinks.sink1.hostname = 10.10.5.11agent1.sinks.sink1.port = 4545# Use a channel which buffers events in memoryagent1.channels.channel1.type = memoryagent1.channels.channel1.keep-alive = 0agent1.channels.channel1.capacity = 500000agent1.channels.channel1.transactionCapacity = 100# Bind the source and sink to the channelagent1.sources.source1.channels = channel1agent1.sinks.sink1.channel = channel1
bin/flume-ng agent -c conf -f conf/jiemo-api.properties -n agent1 -Dflume.root.logger=DEBUG,console
agent1.sources = source1agent1.sinks = sink1agent1.channels = channel1# Describe/configure avro sourceagent1.sources.source1.type = avroagent1.sources.source1.bind = 0.0.0.0agent1.sources.source1.port = 4545# Describe logger sink1#agent1.sinks.sink1.type = logger# Describe file sink1agent1.sinks.sink1.type = file_rollagent1.sinks.sink1.sink.directory = /var/log/flume #存放数据位置# Use a channel which buffers events in memoryagent1.channels.channel1.type = memoryagent1.channels.channel1.keep-alive = 1agent1.channels.channel1.capacity = 5000agent1.channels.channel1.transactionCapacity = 100# Bind the source and sink to the channelagent1.sources.source1.channels = channel1agent1.sinks.sink1.channel = channel1
bin/flume-ng agent -c conf -f conf/jiemo-api-avro.properties -n agent1 -Dflume.root.logger=DEBUG,console