我正在使用 fluentd 来跟踪日志文件并将日志推送到弹性搜索索引。我有两个问题——
1)fluentd如何存储给定文件最后读取的位置?我的 pos 文件中的一个示例是 -
/myfolder/myfile.log 00000000004cfccb 0000000000116ce0
这些值00000000004cfccb
和0000000000116ce0
表示什么?
2) 这个特定的文件 ( myfile.log
) 总共有 2520 行。由于某种原因,最后 100 行没有被读取。我重新启动了 td 代理,但它仍然无法读取最后 100 行。什么时候会发生?
我的 td-agent 源看起来像这样 -
<source>
type tail
format none
path /myfolder/*.log
pos_file /var/log/td-agent/mylogfiles.pos
tag mylog.*
read_from_head true
</source>
谢谢,