-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fluentd (td-agent) 阿里云部署 #78
Labels
Comments
排查 fluent/fluent-plugin-kafka 插件的 bug背景
问题根本原因fluentd 使用的 kafka plugin 插件有坑,当 json 格式的消息体中包含有 topic 字段时,会覆盖 default_topic 设置的值; 细节用于收集 k8s 容器日志的 fluentd 配置
和问题直接相关的是
其中看到 问题验证:
安装插件
创建对应的 topic
确认 topic 已经存在
创建消费者
调整 td-agent 的配置文件
重启 td-agent 服务
向 fluentd 采集文件中写入日志
观察两个 consumer 的消费情况
到此,已经验证上述结论;如果 message 中没有 topic 字段,则使用 default_topic 中定义的值,否则使用 topic 字段的值(优先级更高) 最后看一下官方提供的配置说明
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
前置条件
Please follow the Preinstallation Guide to configure your OS properly. This will prevent many unnecessary problems.
安装
安装 td-agent
安装 http output 插件
配置调整
/lib/systemd/system/td-agent.service
td-agent.conf
其他
The text was updated successfully, but these errors were encountered: