简体   繁体   English

ElasticSearch 2.x的Rabbitmq插件

[英]Rabbitmq plugin for ElasticSearch 2.x

I have installed elastic search 2.3.4 in ubuntu 14.04 我在ubuntu 14.04中安装了弹性搜索2.3.4

http://10.xx11:9200/ HTTP://10.xx11:9200 /

{
  "name" : "Everett Thomas",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "2.3.4",
    "build_hash" : "e455fd0c13dceca8dbbdbb1665d068ae55dabe3f",
    "build_timestamp" : "2016-06-30T11:24:31Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.0"
  },
  "tagline" : "You Know, for Search"
}

i have rabbitmq server running on different system (10.xx12). 我有在不同系统(10.xx12)上运行的rabbitmq服务器。 Now, i am trying to connect rabbitmq server with elasticsearch so that all the messages published in the queue will be consumed and inserted into elastic search. 现在,我正在尝试将rabbitmq服务器与elasticsearch连接,以便队列中发布的所有消息都将被使用并插入到弹性搜索中。

/etc/logstash/conf.d/rabbit.conf contains /etc/logstash/conf.d/rabbit.conf包含

rabbitmq {
    host => "10.x.x.12"
    queue => "integration"
    durable => true
    key => "#"
    exchange => "integ"
    threads => 3
    prefetch_count => 50
    port => 5672
    user => "guest"
    password => "guest"
}

Due to plugin issue logstash is not coming up. 由于插件问题,logstash不会出现。

service logstash configtest
Error: Expected one of #, input, filter, output at line 1, column 1 (byte 1) after  {:level=>:error}

I believe we need to install plugin for elastic search . 我相信我们需要安装弹性搜索插件。 In this website i dont see the plugin available for elastic search > 2.0. 在这个网站上,我没有看到弹性搜索> 2.0的插件。

Can someone help in finding the apt plugin so that messages will be published in the queue. 有人可以帮助找到apt插件,以便消息将在队列中发布。

In your rabbit.conf file, you need to add the rabbitmq input to the input {} section. rabbit.conf文件中,您需要将rabbitmq输入添加到input {}部分。 You also need an output{} section with the elasticsearch output to send the docs to your ES server. 您还需要一个带有elasticsearch输出的output{}部分,以将文档发送到您的ES服务器。

input {
  rabbitmq {
    host => "10.x.x.12"
    queue => "integration"
    durable => true
    key => "#"
    exchange => "integ"
    threads => 3
    prefetch_count => 50
    port => 5672
    user => "guest"
    password => "guest"
  }
}
output {
   elasticsearch {
       hosts => ["10.x.x.11:9200"]
       index => "your_index"
       document_type => "your_type"
   }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM