【问题标题】:How to communicate logstash pipelines如何通信logstash管道
【发布时间】:2021-03-11 09:14:34
【问题描述】:

我希望在一个实例中必须运行两个 logstash 管道,其中一个的输出将是另一个的输入。 我已阅读以下文档,

https://www.elastic.co/guide/en/logstash/current/ls-to-ls.html https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html#pipeline-to-pipeline-overview https://www.elastic.co/guide/en/logstash/current/plugins-inputs-lumberjack.html

我对应该采用哪种方法感到困惑。 我想要的东西如下:

第一个logstash:

input {
 # someplugins and codecs are here
}
filter {
 # some operations here
}
output {
 elasticsearch {
  ... 
 }
 file {
  ...
 }
 logstash {
 }
}

第二个如下:

input {
   logstash {
   }
}
filter {
   #some operations are here
}
output {
  elasticsearch {
  }
}

我知道没有名为 logstash 的插件。我用这个名字来解释情况。 那么,为此我应该遵循什么?我是否需要消息队列(kafka、redis)或伐木工人协议,或者我应该为此目的需要节拍还是有更好的选择

有人可以为此目的回答基本管道吗?

感谢回复

【问题讨论】:

    标签: logstash


    【解决方案1】:

    以下是解决问题的最简单方法。

    - pipeline.id: first_pipeline
      config.string: 
        input { stdin { } }
        output { pipeline { send_to => [commonOut] } }
    - pipeline.id: second_pipeline
      config.string: |
        input { pipeline { address => commonOut } }
        filter {
        }
        output { stdout { codec => rubydebug } }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多