要不要再翻翻文档呢?

message时间错乱问题

Kibana | 作者 shitangjiejie | 发布于2017年12月27日 | 阅读数:3497

如图按照@timestamp排序,message里的时间会错乱,请问各位大神解决方案
微信图片_20171227142111.png
已邀请:

strglee

赞同来自: shitangjiejie

@timestamp字段是默认是读取日志的时间。想要按照日志生成时间排序,只需要把日志生成时间赋值给@timestamp就可以了
filter {
grok {
match => ["message", "%{TIMESTAMP_ISO8601:logdate}"]
}
date {
match => ["logdate", "yyyy-MM-dd HH:mm:ss.SSS"]
target => "@timestamp"
}
}

要回复问题请先登录注册