首页 > 解决方案 > Fluentd td-agent.log 文件大小不断增加

问题描述

日志文件(C:\opt\td-agent\td-agent.log)不断增加,如何设置限制?

有一些配置,比如文件旋转,还有一个命令,但是我们有一个 fluentd 作为 Windows 服务运行,所以如果有任何配置,请在 .conf 文件中或在从 Powershell 运行 fluentd 服务时提出建议。

为了重现保持 fluentd 服务运行并处理不同的消息,文件大小不断增加。

预期行为 文件中的旧内容应在达到一定限制后被删除。

<source>
  @type sql
  host HOSTNAME
  database db_name
  adapter sqlserver
  username WindowsUser
  password WindowsPwd
  <table>
    table tbl_name
    update_column insert_timestamp
  </table>
</source>

<match **>
  @type stdout
</match>

标签: fluentd

解决方案


推荐阅读