当前位置:网站首页>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
边栏推荐
- MySQL auto start settings start with systemctl start mysqld
- Climbing watermelon video URL
- k8s之实现redis一主多从动态扩缩容
- Generate verification code
- C byte array (byte []) and string are converted to each other
- positioner
- Romance in C language
- Implementation of object detection case based on SSD
- Robocode tutorial 5 - enemy class
- Deep learning classic network analysis and target detection (I): r-cnn
猜你喜欢

MATLAB从入门到精通(二)

7-21 wrong questions involve knowledge points.

Auto. JS custom dialog box

Gobang game based on pyGame Library

由tcl脚本生成板子对应的vivado工程

Dynamically add default fusing rules to feign client based on sentinel + Nacos

硬核解析Promise对象(这七个必会的常用API和七个关键问题你都了解吗?)

Dock installation redis

C medium? This form of

深度学习经典网络解析目标检测篇(一):R-CNN
随机推荐
proxy server
RC smart pointer in rust
软件测试总结
Identification verification code
Robocode tutorial 8 - advanced robot
Install pyshp Library
Implementation of object detection case based on SSD
The difference between deep copy and shallow copy
Matlab tips (6) comparison of seven filtering methods
Flash - Middleware
【ACM】376. 摆动序列
Dock installation redis
Secure credit
Test post and login function
Gobang game based on pyGame Library
Deep learning classic network analysis and target detection (I): r-cnn
mysql自动启动设置用Systemctl start mysqld启动
positioner
Gst-launch-1.0 usage notes
MATLAB从入门到精通(二)