当前位置:网站首页>logstash 7. There is a time problem in X. the difference between @ timestamp and local time is 8 hours
logstash 7. There is a time problem in X. the difference between @ timestamp and local time is 8 hours
2022-04-23 18:14:00 【The hunter is eating meat】
1、 problem :
edition :logstash-7.16.2
Logstash The time in is Greenwich mean time , yes 0 The time zone , And our time zone is East 8 District , So by logstash The data collected will be different from our time 8 Hour time difference .
When we are in the morning 8 At o'clock , Greenwich mean time is 0 spot , This will lead to problems related to time .
2、 resolvent
resolvent Is in Add... To the current time 8 Hours .
filter {
ruby {
code => "event.set('timestamp', event.get('@timestamp').time.localtime + 8*60*60)"
}
ruby {
code => "event.set('@timestamp',event.get('timestamp'))"
}
mutate {
remove_field => ["timestamp"]
}
}
3、 test
restart logstash , You can see Timestamp and in the log content logstash The timestamp (@timestamp) Can be right .
版权声明
本文为[The hunter is eating meat]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210611118598.html
边栏推荐
- Crack sliding verification code
- 硬核解析Promise对象(这七个必会的常用API和七个关键问题你都了解吗?)
- 线上怎么确定期货账户安全的?
- 多功能工具箱微信小程序源码
- Gobang game based on pyGame Library
- 串口调试工具cutecom和minicom
- 深度学习经典网络解析目标检测篇(一):R-CNN
- Flash - Middleware
- Install the yapiupload plug-in in idea and upload the API interface to the Yapi document
- Selenium + phantom JS crack sliding verification 2
猜你喜欢
随机推荐
MATLAB从入门到精通(二)
Dock installation redis
【ACM】376. Swing sequence
I / O multiplexing and its related details
Cygwin64 right click to add menu, and open cygwin64 here
I/O多路复用及其相关详解
Permission management with binary
Jenkspy package installation
硬核解析Promise對象(這七個必會的常用API和七個關鍵問題你都了解嗎?)
Generate verification code
Install pyshp Library
C network related operations
STM32学习记录0008——GPIO那些事1
由tcl脚本生成板子对应的vivado工程
【ACM】509. 斐波那契数(dp五部曲)
k8s之实现redis一主多从动态扩缩容
[UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (2)
xlsxwriter. exceptions. Filecreateerror: [errno 13] permission denied
Identification verification code
WIN1 remote "this may be due to credssp encryption Oracle correction" solution