gpt4 book ai didi

docker - 我的结构化日志消息中的时间字段来自哪里?

转载 作者:行者123 更新时间:2023-12-02 21:06:14 25 4
gpt4 key购买 nike

我正在用一个唯一的时间字段jsont_code将json结构的日志消息写到stdout。

我使用Fluent Bit和尾部输入插件收集日志消息,该插件使用解析器origin_timestamp。解析器配置了docker

有关Time_Key time的文档说:

If the log entry provides a field with a timestamp, this option specify the name of that field.



由于 Time_Key!= time,我本来以为Fluent Bit不会添加任何时间字段,但是最终以Elasticsearch结尾的日志消息具有以下时间字段:
  • (包含原始日志消息的字段日志中的origin_timestamp)
  • origin_timestamp
  • origin_timestamp
  • time(有时甚至多次)。
  • @timestamp字段可能是我在Fluent Bit中使用的es输出插件添加的,但是 到底是哪里的@timestamp字段来自?

    最佳答案

    我在Fluent位问题跟踪器Duplicate @timestamp fields in elasticsearch output中遇到了以下问题,这听起来可能与您所讨论的问题有关。

    我已经深深地链接到其中一位贡献者的特定评论,其中概述了两种可能的解决方案,具体取决于您是使用他们的Kubernetes Filter插件,还是直接将日志摄取到Elasticsearch中。

    希望这可以帮助。

    关于docker - 我的结构化日志消息中的时间字段来自哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57869404/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com