实现logstash从rabbitmq取数据存elasticsearch
创始人
2024-03-20 11:46:07

input {
    rabbitmq {      
        host => "rabbitmq的ip:5672"
        vhost => "/"
        user => "rabbitmq用户名称"
        password => "rabbimq密码"
        durable => true
        exchange => "pro.community.exchange"    (配置指定rabbimq的交换器。)
        exchange_type => "direct"                        (交换器类型)
        key => "route.logstash.es.create"              (这个是routingkey)
        queue => "community_topic_create"          (rabbimq队列名称)
    }
}
filter {
         
}
output {
    elasticsearch {
        action => "create"          (对es的操作行为,具体可以看官网,这里是新增索引填create)
        hosts => ["elasticsearch的ip:9200"]
        user => "elastic"
        password => "密码"
        index => "索引名称"   
        document_id => "%{documentId}"   (指定es文档id,便于修改和删除)
        document_type => "%{documentType}"
    }
}

相关内容

热门资讯

玩家必知教程!hhpoker作... 玩家必知教程!hhpoker作弊码(辅助挂)果然真的有挂(真实有挂)1、每一步都需要思考,不同水平的...
六分钟了解!pokemmo辅助... 六分钟了解!pokemmo辅助器(辅助挂)一贯是真的有挂(真的有挂)1、在pokemmo辅助器插件功...
普及知识!哈糖大菠萝有挂吗5个... 普及知识!哈糖大菠萝有挂吗5个常用方法(辅助挂)其实是真的有挂(有挂头条)1、哈糖大菠萝有挂吗5个常...
玩家必看分享!wepoker手... 玩家必看分享!wepoker手机版辅助(辅助挂)一贯真的是有挂(有挂头条)玩家必看分享!wepoke...
必看攻略!wepoker买钻石... 必看攻略!wepoker买钻石有用吗(辅助挂)切实有挂(有挂功能)所有人都在同一条线上,像星星一样排...