
之前使用 fluentd 收集日志,当 OUTPUT 目标出现故障时,chunk 达到设定的大小后,会停止收集。当 OUTPUT 目标恢复后,可以自动恢复收集。这样即使 OUTPUT 的后端是单节点,做些许运维操作不会造成日志的丢失,比较方便。
想着 fluent-bit 资源消耗更低,想换成这个。在测试时,发现当 OUTPUT 目标出现故障时,chunk 达到设定的大小后,会停止收集。当 OUTPUT 目标恢复后,chunk 大小会减小,但是 INPUT 并没有恢复收集日志。难道要手动重启恢复?希望是我配置得不对,不然使用起来不方便啊。
配置
[SERVICE] flush 1 log_level info parsers_file parsers.conf storage.path /data/fluent-bit-data storage.sync normal storage.checksum off storage.max_chunks_up 128 storage.backlog.mem_limit 10M storage.total_limit_size 100M 1 xhwdt OP INPUT 配置 ``` [INPUT] storage.pause_on_chunks_overlimit on ``` |
2 awsl2333 166 天前 fluentd 性能太差 fluent-bit 吞吐量可以更高,当 OUTPUT 故障的时候,input 中已经读取的部分会存在 chunk ,应该是自动恢复的,等到 chunk 为空再看看行为 |