# Logstash Elapsed filter

**URL:** <https://discuss.elastic.co/t/logstash-elapsed-filter/254858>\
**Category:** Logstash\
**Created:** [November 10, 2020, 7:26am UTC](https://discuss.elastic.co/t/logstash-elapsed-filter/254858 "2020-11-10T07:26:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![melorium](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/melorium/32/100710_2.png) [@melorium](https://discuss.elastic.co/u/melorium)\
**Post date:** [November 10, 2020, 7:26am UTC](https://discuss.elastic.co/t/logstash-elapsed-filter/254858/1 "2020-11-10T07:26:42Z")

</div>

Hi.

I have problem with elapsed filter il tried everything but it random miss events.  
It matches around 75% of all events only and different everytime I sent the log in.  
Starting Logstash with one worker also.

Can I use another ruby filter or aggregate instead.

I need elapsed time like this HH:MM:SS  
.\bin\logstash.bat -w 1 -f .\config\auto.yml

 ![Skärmavbild 2020-11-10 kl. 08.20.52](https://us1.discourse-cdn.com/elastic/original/3X/6/1/613f9d0c186fdfd83d9a456760d9a5b5044df78e.png)

here is my configs.  
filter {  
if "RU" in [tags] {  
elapsed {  
start\_tag =\> "STARTING-RUNNER"  
end\_tag =\> "ENDING-RUNNER"  
periodic\_flush =\> false  
unique\_id\_field =\> "host\_name"  
timeout =\> 86400  
new\_event\_on\_match =\> false  
}  
}  
}

filter {  
if "ST" in [tags] {  
elapsed {  
start\_tag =\> "STARTING-STAGE"  
end\_tag =\> "ENDING-STAGE"  
periodic\_flush =\> false  
unique\_id\_field =\> "runner"  
timeout =\> 86400  
new\_event\_on\_match =\> false  
}  
}  
}

Best Regards Dennis

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 8, 2020, 7:26am UTC](https://discuss.elastic.co/t/logstash-elapsed-filter/254858/2 "2020-12-08T07:26:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
