当前位置:网站首页>Logstash timestamp converted to UNIX nanosecond nano second time

Logstash timestamp converted to UNIX nanosecond nano second time

2022-06-12 21:45:00 zhangphil

logstash The timestamp is converted to unix nanosecond nano second time

filter {
	ruby { 
		code => "event.set('unix_nano_time',(event.get('@timestamp').to_f.round(9)*1000*1000*1000).to_i)" 
	}
}

Then take it out of the configuration unix_nano_time That is :

"%{unix_nano_time}"

原网站

版权声明
本文为[zhangphil]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206122139127034.html