【发布时间】:2018-07-31 06:38:01
【问题描述】:
场景如下:我已经使用 out_forward 和 in_forward 插件将数据/数据包从一个 fluentd 节点发送到另一个节点,并希望将所述数据保存在 mongodb 中。为了实现这一点,我已将所述数据写入文件并使用@tail 协议来尾随文件,如我的配置中所示。文件。但是,我不明白的 mongodb 中没有这些数据。我将不胜感激所有的帮助和提示。谢谢。
<source> #in forward
@type forward
port 24224
bind 0.0.0.0
</source>
<match **>
@type file
path /var/log/td-agent/xyz.log
</match>
<source>
@type tail
path /var/log/td-agent/xyz.log
pos_file /var/log/td-agent/xyz.log.pos
<parse>
@type syslog
</parse>
tag mongo.syslog.access
</source>
<match mongo.**>
@type mongo
host localhost
port 27017
database syslog
collection abc
capped
capped_size 1024m
include_time_key true
</match>
【问题讨论】: