当前位置:网站首页>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
边栏推荐
- Jenkspy package installation
- PowerDesigner various font settings; Preview font setting; SQL font settings
- MySQL_ 01_ Simple data retrieval
- Log4j2 cross thread print traceid
- Robocode tutorial 8 - advanced robot
- 【ACM】509. Fibonacci number (DP Trilogy)
- proxy server
- Installation du docker redis
- Implementation of image recognition code based on VGg convolutional neural network
- Using transmittablethreadlocal to realize parameter cross thread transmission
猜你喜欢
![Yolov4 pruning [with code]](/img/09/ea4376d52edb7e419ace2cb1e0356b.gif)
Yolov4 pruning [with code]

JD freefuck Jingdong HaoMao control panel background Command Execution Vulnerability
![[UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (2)](/img/91/3272d5ad04cd1d8476c739546f4356.png)
[UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (2)

How to install jsonpath package

re正則錶達式

From source code to executable file

Using files to save data (C language)

硬核解析Promise對象(這七個必會的常用API和七個關鍵問題你都了解嗎?)

Robocode Tutorial 4 - robocode's game physics

JD-FreeFuck 京東薅羊毛控制面板 後臺命令執行漏洞
随机推荐
C language array processing batch data
xlsxwriter. exceptions. Filecreateerror: [errno 13] permission denied
硬核解析Promise对象(这七个必会的常用API和七个关键问题你都了解吗?)
Resolves the interface method that allows annotation requests to be written in postman
Realization of consumer gray scale
Gst-launch-1.0 usage notes
Array rotation
Crawler for querying nicknames and avatars based on qqwebapi
硬核解析Promise對象(這七個必會的常用API和七個關鍵問題你都了解嗎?)
Implementation of object detection case based on SSD
How to ensure the security of futures accounts online?
Yolov4 pruning [with code]
Read excel, int digital time to time
MATLAB小技巧(6)七种滤波方法比较
Crawling mobile game website game details and comments (MQ + multithreading)
C language input and output (printf and scanf functions, putchar and getchar functions)
Test post and login function
Crawl the product data of Xiaomi Youpin app
idea中安装YapiUpload 插件将api接口上传到yapi文档上
Cygwin64 right click to add menu, and open cygwin64 here