我有一个包含多个节点的Web服务器堆栈(自动扩展组),并且每个Web服务器都配置为使用Fluentd将日志文件转发到中央收集器,该收集器将日志保存在S3存储桶中。
我正在测试一个新的收集器,并将Web服务器配置为向旧收集器和新收集器发送访问日志的副本,但聚合文件中存在巨大差异。
旧收藏家节省了2倍的日志数据。我不能为我的生活找出问题所在,除非数据在前往新收集器的途中丢失(我怎么能最好地测试这个?)。
Web服务器td-agent.conf
<source>
type tail
path /var/log/some/access.log
tag some-access.log
format tsv
keys time,userId,position,userAgent,platform
pos_file /tmp/fluent.some-access.log.pos
rotate_wait
</source>
<match some-access.log>
type copy
<store>
type forward
<server>
host log-collector-1.lan
port 24224
</server>
</store>
<store>
type forward
<server>
host log-collector-2.lan
port 24224
</server>
</store>
</match>
日志收集器具有完全相同的配置......因此无需查看。
答案 0 :(得分:2)
我第一次听到这种行为。 我假设log-collector-1.lan引用与log-collector-2.lan相同的服务器。
您没有粘贴聚合器端配置,所以只是一个猜测。 如何检查“保存2x日志数据&#39;?
”您可以按照以下方式检查流利的接收日志。