简体   繁体   English

在Logstash 1.5中跨事件保留标签/字段

[英]Retain tag/field across events in logstash 1.5

I'm using logstash 1.5 to analyze logs. 我正在使用logstash 1.5分析日志。

I want to track two events which occur one after the other. 我想跟踪两个接连发生的事件。 So I would like to set a flag/field/tag when first event occurs and retain the value across events. 所以我想在第一个事件发生时设置标志/字段/标签,并在事件之间保留值。

I looked at this link but looks like grep and drop are not supported in logstash 1.5. 我看了一下此链接,但看起来Logstash 1.5不支持grep和drop。

Is there a way of achieving this? 有没有办法做到这一点?

The closest you can get with logstash is the elapsed{} filter. 使用logstash可以得到的最接近的是elapsed {}过滤器。 You could use that code as a basis for your own filter if it doesn't meet your needs. 如果不满足您的要求,则可以将该代码用作您自己的过滤器的基础。 I also run some external (python) post-processing to do more than elapsed{} can (or should) do. 我还运行一些外部(python)后处理,以完成已过去的{}可以(或应该)做的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM