# Add option to 'elapsed' plugin to use newest start event

**URL:** <https://discuss.elastic.co/t/add-option-to-elapsed-plugin-to-use-newest-start-event/94122>\
**Category:** Logstash\
**Created:** [July 21, 2017, 1:50pm UTC](https://discuss.elastic.co/t/add-option-to-elapsed-plugin-to-use-newest-start-event/94122 "2017-07-21T13:50:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Harr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james_harr/32/20322_2.png) [@James\_Harr](https://discuss.elastic.co/u/James_Harr)\
**Post date:** [July 21, 2017, 1:50pm UTC](https://discuss.elastic.co/t/add-option-to-elapsed-plugin-to-use-newest-start-event/94122/1 "2017-07-21T13:50:36Z")

</div>

I'm trying to use the 'elapsed' plugin to differentiate between two events. When the plugin detects multiple start events, it uses the first to measure the elapsed time. I would like to add an option for it to use the newest start event instead of the first.

I have a situation where a start event may or may not lead to second event, with the unique identifier staying the same. I need to measure the time between the newest start event and the end event.

Any thoughts on adding this as a standard feature of this plugin?

Quick configuration example:  
filter {  
elapsed {  
start\_tag =\> "start event tag"  
end\_tag =\> "end event tag"  
unique\_id\_field =\> "id field name"  
timeout =\> seconds  
new\_event\_on\_match =\> true/false  
start\_event =\> "first"/"newest"  
}  
}

---

<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:** [August 18, 2017, 1:50pm UTC](https://discuss.elastic.co/t/add-option-to-elapsed-plugin-to-use-newest-start-event/94122/2 "2017-08-18T13:50:38Z")

</div>

Closed on August 18, 2017, 1:50pm UTC

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