在logstash中,默认会有一个时间字段,用于记录当前收集日志的时间戳,正常情况下没什么问题。当第一次收集日志,或者使用缓存写入的时候,就会发现timastamp会和实际的时间发生偏差。

那么我建议最好使用日志中的时间,转化为logstash的timestamp。

     在filter中加入

date {
         match => ["timeLocal": "dd/MMM/yyyy:HH:mm:ss Z"]
}

 

相关文章:

  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2021-06-25
  • 2022-02-23
  • 2021-10-17
猜你喜欢
  • 2021-04-25
  • 2021-09-15
  • 2021-05-23
  • 2021-08-02
相关资源
相似解决方案