首页 > 解决方案 > fluentd 是否支持 HTTP 输入中的 protobuf 消息?

问题描述

是否可以向 Fluentd 发送 protobuf 消息?

我不是要求 protobuf 解析,只是接收 protobuf 并将其发送到输出。

配置示例:

<source>
# Here I would receive the protobuf message
@type http
port 9880
bind 0.0.0.0
body_size_limit 32m
keepalive_timeout 10s
</source>

<match hello>
# And here I'd send the protobuf message to another endpoint
@type http

endpoint "http://localhost:9999"
open_timeout 2

<buffer>
flush_interval 1s
</buffer>
</match>

使用此配置,fluentd 会回答:

400 Bad Request
'json' or 'msgpack' parameter is required

标签: protocol-buffersfluentd

解决方案


您可以将fluent-plugin-protobuf-http用于根据自定义模式(.proto文件)编码的单/批输入协议缓冲区的消息。


推荐阅读