简体   繁体   English

熟悉Logstash输出插件

[英]Fluentd to Logstash output plugin

I am trying to read from the scribe server using flunetd and output those logs to be stored in logstash for now. 我试图使用flunetd从scribe服务器读取并输出这些日志暂时存储在logstash中。 I know it's very stupid to log the scribe_central logs to another central logger, but we need this to be done in our current architecture. 我知道将scribe_central日志记录到另一个中央记录器是非常愚蠢的,但我们需要在我们当前的架构中完成。

Does anyone know if there is any plugin to do that? 有谁知道是否有任何插件可以做到这一点? I searched Google but could not find any. 我搜索了谷歌但找不到任何东西。

For Scribe <-> Fluentd, there is fluent-plugin-scribe : 对于Scribe < - > Fluentd,有一个流畅的插件 - 抄写员

For Fluentd <-> Logstash, a couple of options: 对于Fluentd < - > Logstash,有两个选项:

  1. Use Redis in the middle, and use fluent-plugin-redis and input_redis on Logstash's side. 在中间使用Redis,并在Logstash端使用fluent-plugin-redis和input_redis。 So it would be Fluentd -> Redis -> Logstash. 所以它将是Fluentd - > Redis - > Logstash。 This is what Logstash recommends anyway with log shippers + Logstash. 这就是Logstash推荐的日志托运人+ Logstash。
  2. Alternatively, you can use Fluentd's out_forward plugin with Logstash's TCP input. 或者,您可以使用Fluentd的out_forward插件和Logstash的TCP输入。 Logstash has Fluentd codec to handle the input coming from Fluentd. Logstash具有Fluentd编解码器来处理来自Fluentd的输入。

You can forward it directly to your logstash tcp input :) 您可以将它直接转发到您的logstash tcp输入:)

I wrote a flunetd output plugin for forwarding fluentd events to a generic receiver through a secured tcp connection (can be configured for non-secured as well). 我写了一个flunetd输出插件,用于通过安全的 tcp连接将流畅的事件转发到通用接收器(也可以配置为非安全的)。

To add the plugin to your fluentd agent, use the following command: 要将插件添加到流畅的代理程序,请使用以下命令:

gem install fluent-plugin-loomsystems

Also see full original answer , good luck. 还看到完整的原始答案 ,祝你好运。

I got it working with http output from fluentd and http input for logstash, below the configuration snippets: 我在配置片段下面使用了来自jrstd和http输入的http输出的logstash:

fluentd: fluentd:

<match **>
    @type http
    endpoint_url http://logstash-box:8080/
    http_method put
    serializer json
    raise_on_error false
</match>

Logstash: Logstash:

input {
    http {
        port => 8080 
    }
}

Obs: You may have to install the plugin gem install fluent-plugin-out-http Obs:您可能必须安装插件gem install fluent-plugin-out-http

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM