如何通信 logstash 管道
How to communicate logstash pipelines
我想在一个实例中必须有两个 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)还是 lumberjack 协议,或者我应该为此目的需要节拍 或者有没有更好的选择?
有人可以用基本管道回答这个问题吗?
感谢您的回答
以下是解决问题的最简单方法。
- 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 } }
我想在一个实例中必须有两个 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)还是 lumberjack 协议,或者我应该为此目的需要节拍 或者有没有更好的选择?
有人可以用基本管道回答这个问题吗?
感谢您的回答
以下是解决问题的最简单方法。
- 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 } }