当前位置:网站首页>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
边栏推荐
- Nodejs安装
- Gobang game based on pyGame Library
- powerdesigner各种字体设置;preview字体设置;sql字体设置
- 【ACM】376. 摆动序列
- [UDS unified diagnostic service] IV. typical diagnostic service (6) - input / output control unit (0x2F)
- Generate verification code
- I / O multiplexing and its related details
- Batch export ArcGIS attribute table
- SSD硬盘SATA接口和M.2接口区别(详细)总结
- Data stream encryption and decryption of C
猜你喜欢
From introduction to mastery of MATLAB (2)
STM32学习记录0008——GPIO那些事1
Operators in C language
【ACM】376. 摆动序列
多功能工具箱微信小程序源码
【ACM】455. 分发饼干(1. 大饼干优先喂给大胃口;2. 遍历两个数组可以只用一个for循环(用下标索引--来遍历另一个数组))
[UDS unified diagnostic service] IV. typical diagnostic service (6) - input / output control unit (0x2F)
Qt读写XML文件(含源码+注释)
Install pyshp Library
【ACM】70. climb stairs
随机推荐
C [file operation] read TXT text by line
How to ensure the security of futures accounts online?
JD freefuck Jingdong HaoMao control panel background Command Execution Vulnerability
Format problems encountered in word typesetting
Cells in rust share variable pointers
【ACM】455. 分发饼干(1. 大饼干优先喂给大胃口;2. 遍历两个数组可以只用一个for循环(用下标索引--来遍历另一个数组))
Nodejs installation
.104History
Crawl lottery data
Auto. JS custom dialog box
Pyppeter crawler
Robocode tutorial 7 - Radar locking
Operators in C language
PowerDesigner various font settings; Preview font setting; SQL font settings
深度学习经典网络解析目标检测篇(一):R-CNN
7-21 wrong questions involve knowledge points.
mysql自动启动设置用Systemctl start mysqld启动
Transfer learning of five categories of pictures based on VGg
Flash operates on multiple databases
MySQL auto start settings start with systemctl start mysqld