【问题标题】:Forwarding packets using Fluentd使用 Fluentd 转发数据包
【发布时间】:2018-04-27 14:34:05
【问题描述】:

我的 Fluentd 配置中有以下代码:

<source>
  @type udp
  tag traceudp
  port 3543
  format none
  bind 0.0.0.0
</source>

这是一个接收 udp 包的插件,如果我将它发送到标准输出,我会看到消息的内容。现在我想将此消息转发到另一个 UDP 接收器,而不对 UDP 包进行任何更改。我该怎么做?我应该使用什么输出插件?

【问题讨论】:

    标签: udp fluentd


    【解决方案1】:

    尝试使用转发插件 (https://docs.fluentd.org/v0.12/articles/out_forward)。

    类似这样的:

    <source>
      @type udp
      @label @udp_stream
      tag traceudp
      port 3543
      format none
      bind 0.0.0.0
    </source>
    
    <label @udp_stream>
      <match **>
        @type forward
        send_timeout 60s
        recover_wait 10s
        hard_timeout 60s
    
        <server>
          name myserver1
          host 192.168.1.3   <---- your server IP
          port 3543
          weight 60
      </server>
      </match>
    </label>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-16
      • 2014-11-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多