当前位置:网站首页>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
边栏推荐
- k8s之实现redis一主多从动态扩缩容
- Operators in C language
- ArcGIS table to excel exceeds the upper limit, conversion failed
- Solving the problem of displaying too many unique values in ArcGIS partition statistics failed
- Matlab tips (6) comparison of seven filtering methods
- 硬核解析Promise對象(這七個必會的常用API和七個關鍵問題你都了解嗎?)
- Crawler for querying nicknames and avatars based on qqwebapi
- Rust: how to match a string?
- Box pointer of rust
- Read excel, int digital time to time
猜你喜欢
Qtablewidget usage explanation
Robocode tutorial 8 - advanced robot
re正则表达式
[UDS unified diagnostic service] IV. typical diagnostic service (4) - online programming function unit (0x34-0x38)
C#的随机数生成
MySQL_ 01_ Simple data retrieval
Robocode tutorial 7 - Radar locking
多功能工具箱微信小程序源码
解决报错max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
Re expression régulière
随机推荐
Arcpy adds fields and loop assignments to vector data
word frequency count
What are the relationships and differences between threads and processes
Crawler for querying nicknames and avatars based on qqwebapi
Crawl lottery data
Rust: the output information of println is displayed during the unit test
Nat commun | current progress and open challenges of applied deep learning in Bioscience
Correct opening method of option
Robocode tutorial 5 - enemy class
Read excel, int digital time to time
JD-FreeFuck 京东薅羊毛控制面板 后台命令执行漏洞
【ACM】455. Distribute Biscuits (1. Give priority to big biscuits to big appetite; 2. Traverse two arrays with only one for loop (use subscript index -- to traverse another array))
Resolve the error Max virtual memory areas VM max_ map_ count [65530] is too low, increase to at least [262144]
C language input and output (printf and scanf functions, putchar and getchar functions)
Installation du docker redis
硬核解析Promise對象(這七個必會的常用API和七個關鍵問題你都了解嗎?)
MySQL_ 01_ Simple data retrieval
Differences between SSD hard disk SATA interface and m.2 interface (detailed summary)
Excel opens large CSV format data
Gobang game based on pyGame Library