# Associate events with a common field (in order to obtain duration, throughput, ...)

**URL:** <https://discuss.elastic.co/t/associate-events-with-a-common-field-in-order-to-obtain-duration-throughput/174739>\
**Category:** Kibana\
**Created:** [April 1, 2019, 8:55am UTC](https://discuss.elastic.co/t/associate-events-with-a-common-field-in-order-to-obtain-duration-throughput/174739 "2019-04-01T08:55:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zebu14](https://avatars.discourse-cdn.com/v4/letter/z/aca169/32.png) [@zebu14](https://discuss.elastic.co/u/zebu14)\
**Post date:** [April 1, 2019, 8:55am UTC](https://discuss.elastic.co/t/associate-events-with-a-common-field-in-order-to-obtain-duration-throughput/174739/1 "2019-04-01T08:55:37Z")

</div>

Hello,

I am migrating from Splunk to ELK and I am trying to find a similar function to the "transaction" function in Splunk.

This function aggregates events who shares a common value in a defined field and offers a useful function "duration" that give the time elapsed between the events.

I saw that the "elapsed" function in Logstash would propose something similar but It's not quite possible in our architecture.

Is there a way to obtain a similar function in Kibana ?

Thank you.

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [April 1, 2019, 4:51pm UTC](https://discuss.elastic.co/t/associate-events-with-a-common-field-in-order-to-obtain-duration-throughput/174739/2 "2019-04-01T16:51:42Z")

</div>

Unfortunately, there does not appear to be an aggregation in Elasticsearch that can compute duration between documents. So there is no way to do this in Kibana.

Computing the duration as a field in the document (such as using the `elapsed` function in Logstash) is the best way to do this.

There is more background information in this thread. [How to find correlated messages and time between them](https://discuss.elastic.co/t/how-to-find-correlated-messages-and-time-between-them/129775)

---

<div class="post-metadata">

**Author:** ![zebu14](https://avatars.discourse-cdn.com/v4/letter/z/aca169/32.png) [@zebu14](https://discuss.elastic.co/u/zebu14)\
**Post date:** [April 2, 2019, 10:10am UTC](https://discuss.elastic.co/t/associate-events-with-a-common-field-in-order-to-obtain-duration-throughput/174739/3 "2019-04-02T10:10:54Z")

</div>

Thanks for this first response.  
As I said, the implementation of the elapsed function seems to be difficult in our actual architecture...

The fact is that each event has an absolute date field, and an event\_id field  
Is is possible to associate events on a common field in Kibana ?  
Then would it be possible to compute the "time difference" betwenn this two elements (maybe with a Timelion request) ?

Thanks

---

<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:** [April 30, 2019, 10:10am UTC](https://discuss.elastic.co/t/associate-events-with-a-common-field-in-order-to-obtain-duration-throughput/174739/4 "2019-04-30T10:10:54Z")

</div>

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