elasticsearch 根据条件计算特定日志之间的时间
我有一个日志文件中的系统日志列表,其中我必须根据某些条件计算两个特定日志之间的时间差elasticsearch 根据条件计算特定日志之间的时间,elasticsearch,logstash,kibana,kibana-5,elasticsearch,Logstash,Kibana,Kibana 5,我有一个日志文件中的系统日志列表,其中我必须根据某些条件计算两个特定日志之间的时间差 @timestamp message May 19th 2016, 02:55:29.003 just some log May 19th 2016, 02:55:29.003 retired 2 times May 19th 2016, 02:55:29.200 System1 down ------- May 19th 2016, 02
@timestamp message
May 19th 2016, 02:55:29.003 just some log
May 19th 2016, 02:55:29.003 retired 2 times
May 19th 2016, 02:55:29.200 System1 down -------
May 19th 2016, 02:55:29.205 just some log
May 19th 2016, 02:55:29.453 System1 up ----
May 19th 2016, 02:55:39.200 System2 down
May 19th 2016, 02:55:49.205 just some log
May 19th 2016, 02:55:53.453 System2 up -------
May 19th 2016, 02:55:58.453 all done
例如,在上面提到的日志中,当我们在某个日志中看到消息“retried”时,我们需要触发计算
在看到消息时,它应该开始计算与包含“System1 Down”消息的紧跟消息的差值,直到看到“System1 Up”消息。但这里的问题是,系统消息可以是动态的,如“System1”或“System2”
如果以“System1 Up”开头,则应计算到“System1 Down”的时间
“System2 Up”也一样。是否有可能在logstash中使用正则表达式
当在消息中看到“全部完成”时,所有进程都应该停止。如果在下面的任何日志中看到“失效2次”,则应重新开始时差计算
我厌倦了在Logstash和aggregate中使用appeased插件,但不确定,它对这种流不起作用
这样做最好的方法是什么?在Logstash、elastic search或Kibana中。
提前谢谢