Calculation of time spent in the system

Hi Prateek,

Kibana doesn't have anything built-in that would take the difference between documents related by an ID, but it has some scripting functionality.

Here's a link to another post where a script is used to build a metric about concurrent events. It might provide some ideas;

Another option might be the Timelion plugin to Kibana. Here's one video about it but if you search you'll find more; https://www.elastic.co/videos/time-series-analysis-using-timelion

But this is a fairly common question. I'll try to come up with a good solution and post it back here.

Regards,
Lee