fluentd - 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>
解决方案
推荐阅读
- php - 当继承的接口用于类型提示时,为什么 PHP 会发出兼容性错误?
- python - 如何将测试用例参数传递给一个函数使用的 pytest 夹具?
- android - cordova build android - 构建失败并出现异常
- c - 具有多个数字和运算符的 C 命令行计算器出现问题
- python - 如果在任何正在运行的进程中抛出异常,则重新启动多处理
- python - 如何从用 Python 编写的 azure 函数中检索存储在 BLOB 存储中的模型(UnpicklingError)
- python-3.x - 如何连接 hypercorn 和 starlette 网络框架
- mysql - 如何在 django 中为大文本字段添加唯一约束?
- python - OpenCV 图像过滤器排序
- python - 熊猫数据框根据列范围和值计算多行