gpt4 book ai didi

elasticsearch - ELK-如何从日志文件中选择时间戳记而不是插入时间戳记

转载 作者:行者123 更新时间:2023-12-03 01:34:06 27 4
gpt4 key购买 nike

我知道有很多解决方案,但我找不到最佳解决方案。

我正在使用ELK ** 5.x,**我正在尝试将Kibana配置为依赖于日志文件中的时间戳而不是插入时间戳中的时间戳

这是来自日志文件的示例:

{"@timestamp":"2018-05-01T00:00:44.191Z","@version":"1","host":"x.x.x.x","lt":{"ln":"abc","mp":"2","lo":x.x,"bi":null,"px":x.x,"dm":"x","py":x.x,"pz":x.x.,"apMac":"x:x:x:x:x:x","am":null,"ap":null,"sc":-x,"ar":null,"as":0,"la":x.x,"si":"x:x:x:x:x:x","lh":null,"pn":2,"po":0},"type":"x"}

此Logstash配置文件:
filter {
grok {
match => ["message", "%{TIMESTAMP_ISO8601:tstamp}"]
}

date {
match => ["mytimestamp", "dd/MMM/YYYY:HH:mm:ss +ZZZ"]
}
}

但是Kibana显示了这一点:
No results found 
Unfortunately I could not find any results matching your search. I tried really hard. I looked all over the place and frankly, I just couldn't find anything good. Help me, help you. Here are some ideas:

最佳答案

filter {
grok {
match => ["message", "%{TIMESTAMP_ISO8601:tstamp}"]
}
date {
match => ["tstamp", "ISO8601"]
}

}

关于elasticsearch - ELK-如何从日志文件中选择时间戳记而不是插入时间戳记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53802628/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com