【发布时间】:2021-09-27 22:00:42
【问题描述】:
我们正在使用 fluentd 将日志发送到 aws kinesis firehose。我们可以看到很少有记录不时发送到 aws kinesis firehose。 这是我们在fluentd中的设置。
<system>
log_level info
</system>
<source>
@type tail
path "/var/log/app/tracy.log*"
pos_file "/var/tmp/tracy.log.pos"
pos_file_compaction_interval 72h
@log_level "error"
tag "tracylog"
<parse>
@type "json"
time_key False
</parse>
</source>
<source>
@type monitor_agent
bind 127.0.0.1
port 24220
</source>
<match tracylog>
@type "kinesis_firehose"
region "${awsRegion}"
delivery_stream_name "${delivery_stream_name}"
<instance_profile_credentials>
</instance_profile_credentials>
<buffer>
# Frequency of ingestion
flush_interval 30s
flush_thread_count 4
chunk_limit_size 1m
</buffer>
</match>
【问题讨论】:
-
你检查过那些缺失记录的创建时间吗?我也面临类似的问题,如果我有并发数据点,则只有其中 1 个被传送到目的地。这也是你的情况吗?
-
嗨丽娜,我已经通过更新我的配置文件解决了这个问题。我的情况有两个根本原因 1 。刷新间隔非常高,块大小很小,因此队列中有很多块要刷新 2。与流利的进程相比,我的应用程序启动时间非常快,所以每当缩放事件触发时,很少有初始记录丢失。
标签: fluentd amazon-kinesis-firehose td-agent