实现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}"
    }
}

相关内容

热门资讯

重大科普!微信卡五星辅助器,微... 重大科普!微信卡五星辅助器,微乐自建房脚本免费入口(开挂自建房)工具1.微信卡五星辅助器 选牌创建新...
玩家必备科普!微乐自建房辅助工... 玩家必备科普!微乐自建房辅助工具脚本,微乐自建房脚本免费入口(开挂自建房)软件1、任何微乐自建房辅助...
安装程序教程!微信卡五星辅助器... 安装程序教程!微信卡五星辅助器,微乐小程序免费黑科技(开挂自建房)插件1、玩家可以在微信卡五星辅助器...
最新技巧!微乐家乡麻将自建房辅... 最新技巧!微乐家乡麻将自建房辅助app,微乐小程序免费黑科技(开挂自建房)工具最新技巧!微乐家乡麻将...
科技分享!微乐小程序麻将自建房... 科技分享!微乐小程序麻将自建房辅助工具插件,微乐自建房脚本免费入口(开挂自建房)app1、微乐小程序...