在windows下,新建一个 config_rabbitmq.conf 配置文件

开始logstash的时候,新建一个 run_rabbitMQ.bat 批处理,内容是 logstash -f config_rabbitMQ.conf 

运行 run_rabbitMQ.bat 批处理文件就行了

 

 

先在rabbitmq创建一个队列,使用默认设置

Logstash-input-rabbitmq 配置

 

配置 .conf 文件

input {
    rabbitmq{
        host => "127.0.0.1"
        user => "admin"
        password => "admin"
        queue => "test.logstash.v1"  #队列名称
        durable => true  #和队列保持一致
        codec => "plain"
    }
}

output {
    stdout{
        codec=>json
    }
}

 

 

官方配置说明:https://www.elastic.co/guide/en/logstash/7.1/plugins-inputs-rabbitmq.html

相关文章:

  • 2021-04-26
  • 2022-02-11
  • 2021-11-05
  • 2021-10-09
  • 2021-12-03
  • 2022-12-23
  • 2021-08-18
猜你喜欢
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2021-07-24
  • 2022-12-23
  • 2021-11-15
相关资源
相似解决方案