Flume NG中的ElasticSearch Sink

  ElasticSearch是一个基于Lucene的搜索服务器。它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口。Elasticsearch是用Java开发的,并作为Apache许可条款下的开放源码发布,是当前流行的企业级搜索引擎。设计用于云计算中,能够达到实时搜索,稳定,可靠,快速,安装使用方便。

  在Flume中的ElasticSearchSink支持Flume与Elasticsearch整合,可以将Flume采集的数据传输到Elasticsearch中,其主要配置项如下

a1.sources = r1
a1.sinks = k1
a1.channels = c1

# source
......

# sink
a1.sinks.k1.type=org.apache.flume.sink.elasticsearch.ElasticSearchSink  
a1.sinks.k1.batchSize=10000  
a1.sinks.k1.hostNames=192.168.10.83:9300,192.168.10.84:9301  
a1.sinks.k1.indexType = flume_kafka  
a1.sinks.k1.indexName=logstash  
a1.sinks.k1.clusterName=unifyloggingplatform  
a1.sinks.k1.serializer=org.apache.flume.sink.elasticsearch.ElasticSearchLogStashEventSerializer  
a1.sinks.k1.indexNameBuilder=org.apache.flume.sink.elasticsearch.SimpleIndexNameBuilder 

# channel
......

# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1

 

posted @ 2016-07-16 11:19  刘超★ljc  阅读(3410)  评论(0编辑  收藏  举报