Calculation of time spent in the system

Hi All,

I have a data for visualization which is like some states are generated for a specific ID at different time stamp.
Now I am able to create a table with all details. Please let me know if it is possible to get the difference of time so I could plot a vertical bar chart or line chart corresponding to different ID's giving details of time spent in the system.

PFB sample data in data table having different states, state ID & time stamp for selected ID : -
ConversationID: Ascending Conversation_StateID: Ascending Conversation_Status_Desc: Ascending @timestamp per minute Count
00a53828f5444aa8aea0980c7327509 0c2fd12172934849a7387545605a3b2a processing February 25th 2016, 12:50:00.000 1
00a53828f5444aa8aea0980c7327509 54e1ce468c644cb88ec99daa358c9c31 readyforprocessing February 25th 2016, 12:50:00.000 1
00a53828f5444aa8aea0980c7327509 5f02e489e38148d0b1ea72f12a94c3cc new February 25th 2016, 12:50:00.000 1
00a53828f5444aa8aea0980c7327509 e252080a9ae64e3f8535a40e5a8a8290 readyforsubscription February 25th 2016, 12:46:00.000 1

Regards,
Prateek

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