当前位置:网站首页>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
边栏推荐
- Crawling mobile game website game details and comments (MQ + multithreading)
- Nanotechnology + AI enabled proteomics | Luomi life technology completed nearly ten million US dollars of financing
- Closure type of rust (difference between FN, fnmut and fnone)
- 【ACM】70. 爬楼梯
- Build openstack platform
- Arcpy adds fields and loop assignments to vector data
- Box pointer of rust
- Robocode tutorial 8 - advanced robot
- Gst-launch-1.0 usage notes
- Implementation of image recognition code based on VGg convolutional neural network
猜你喜欢

【ACM】70. 爬楼梯

Deep learning classic network analysis and target detection (I): r-cnn

ArcGIS license error -15 solution

Solution to Chinese garbled code after reg file is imported into the registry

Dock installation redis

From introduction to mastery of MATLAB (2)

Resolves the interface method that allows annotation requests to be written in postman

Calculation of fishing net road density

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

Map basemap Library
随机推荐
【ACM】70. climb stairs
软件测试总结
Crawl lottery data
idea中安装YapiUpload 插件将api接口上传到yapi文档上
Rewrite four functions such as StrCmp in C language
RC smart pointer in rust
mysql自动启动设置用Systemctl start mysqld启动
Clion installation tutorial
Permission management with binary
Data stream encryption and decryption of C
C language input and output (printf and scanf functions, putchar and getchar functions)
JD freefuck Jingdong HaoMao control panel background Command Execution Vulnerability
JD-FreeFuck 京東薅羊毛控制面板 後臺命令執行漏洞
Transfer learning of five categories of pictures based on VGg
Multi thread crawling Marco Polo network supplier data
Dock installation redis
Flash operates on multiple databases
word frequency count
Rust: the output information of println is displayed during the unit test
MySQL auto start settings start with systemctl start mysqld