当前位置:网站首页>The ruby code in logstash converts the @timestamp timestamp format
The ruby code in logstash converts the @timestamp timestamp format
2022-06-22 09:47:00 【zhangphil】
logstash in ruby Code handle @timestamp Timestamp format conversion
filter{
ruby {
code => "event.set('xxx_time',(event.get('@timestamp').time.localtime).strftime('%Y-%m-%d %H:%M:%S'))
"
}
}xxx_time That is, the customized time field in the configuration . The above code will logstash Automatically generated timestamp @timestamp Convert to 2022-01-01 00:00:59, Form like this , Save to xxx_time Inside .
边栏推荐
- [uni app] actual combat summary (including multi terminal packaging)
- PAT甲级 - 1015 Reversible Primes (进制转换&素数判断)
- Introduction to code audit learning notes
- 名词解析:ETL
- 6-44 traversal of binary tree
- FileZilla server prompts 550 could not open file for reading when downloading files (illustration)
- Solutions to prompt non standard import in go language
- 6-8 integer array shift
- Debian10 LVM逻辑卷
- MySQL中from_unixtime和unix_timestamp处理数据库时间戳转换问题-案例
猜你喜欢

Template engine, making interaction elegant

DHCP Relay

Langchao state-owned assets cloud: state-owned assets as a guide to help state-owned enterprises use data to enrich their wisdom in the cloud

Overview of microservice architecture

Hoo Research Institute of Hufu: how does cosmos connect the chain with the "port" of the chain?
![[hdu] P6964 I love counting](/img/ff/f8e79d28758c9bd3019816c8f46723.png)
[hdu] P6964 I love counting
![[学习笔记] 回滚莫队](/img/19/d374dd172b9609a3f57de50791b19e.png)
[学习笔记] 回滚莫队

Should the theme of the IDE be bright or dark? Here comes the ultimate answer!

实现AD环境下多用户隔离FTP

Audio and video 2022 beauty function introduction teach you to play video beauty
随机推荐
PAT甲级 - 1015 Reversible Primes (进制转换&素数判断)
Some penetration test terms I collected
锁-ReentrantLock
双指针仪表盘读数(二) ——表盘位置识别
Advanced Web Zone record of attack and defense world (I)
使用pytorch mask-rcnn进行目标检测/分割训练
Project optimization + online (Master?)
Philosopher‘s Walk Gym 分治+分形
秋招秘籍C
PAT甲级 - 1007 Maximum Subsequence Sum
搭建OpenPGP Key server
Centos7安装PostgreSQL12
坚决打好打赢防汛救灾这场硬仗 全力保障人民群众生命财产安全
MySQL中from_unixtime和unix_timestamp处理数据库时间戳转换问题-案例
systemd 总结 介绍
《网络安全等级保护基本要求》(GBT 22239-2019)标准解读
扎克伯格最新VR原型机来了,要让人混淆虚拟与现实的那种
[structure training camp - module 3]
day575: 分糖果
[hdu] P1466 计算直线的交点数