# Need to create latency graph in timelion

**URL:** <https://discuss.elastic.co/t/need-to-create-latency-graph-in-timelion/173753>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [March 25, 2019, 1:03pm UTC](https://discuss.elastic.co/t/need-to-create-latency-graph-in-timelion/173753 "2019-03-25T13:03:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dheerajbtu](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@Dheerajbtu](https://discuss.elastic.co/u/Dheerajbtu)\
**Post date:** [March 25, 2019, 1:03pm UTC](https://discuss.elastic.co/t/need-to-create-latency-graph-in-timelion/173753/1 "2019-03-25T13:03:47Z")

</div>

Hi,

I need to create a timelion graph where I have receivedTs & repliedTs (which are date types) in documents.

Following is the graph I need to create:

![image](https://us1.discourse-cdn.com/elastic/original/3X/6/a/6abf79d9b68f19cd26fbc1ef92ca5ed1d89a21f5.png)

Where,  
"min\_time\_to\_serve\_request" is 1 sec difference receivedTs & repliedTs  
"avg\_time\_to\_serve\_request" is 3 sec difference receivedTs & repliedTs  
"max\_time\_to\_serve\_request" is 5 sec difference receivedTs & repliedTs

How do I create a query in timelion.

Thanks & Regards,  
Dheeraj B

---

<div class="post-metadata">

**Author:** ![Dheerajbtu](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@Dheerajbtu](https://discuss.elastic.co/u/Dheerajbtu)\
**Post date:** [March 26, 2019, 9:50am UTC](https://discuss.elastic.co/t/need-to-create-latency-graph-in-timelion/173753/2 "2019-03-26T09:50:33Z")

</div>

Hi,

just to explain,

consider that we have receivedTs is at 2:15:17 and repliedTs was at 2:16:18.

and I need all the calls which were replied under 1 second or under 3 seconds.

How can we form a query for it in timelion.

Can someone please suggest.

Thanks & Regards,  
Dheeraj B

---

<div class="post-metadata">

**Author:** ![Dheerajbtu](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@Dheerajbtu](https://discuss.elastic.co/u/Dheerajbtu)\
**Post date:** [March 26, 2019, 10:49am UTC](https://discuss.elastic.co/t/need-to-create-latency-graph-in-timelion/173753/3 "2019-03-26T10:49:40Z")

</div>

Adding to it following is the document I have in kibana.

{  
"eventId": "3-648bfd20-4deb-11e9-93ef-0242ac120003",  
"apiName": "quotient-crm-xapi",  
"clientId": "9c31cfa76b304e23905a58c9d15854d9",  
"requestBytes": 102,  
"instanceName": "1.0.0:15554279",  
"verb": "POST",  
"hostId": "mule.qa.1",  
"apiVersionId": 15554279,  
"userAgent": "Java/1.8.0\_131",  
"orgId": "eeb3ccb6-a2f4-4c7b-9459-7202183bce03",  
"path": "/qtcrm/ihc/getNext",  
"responseBytes": -1,  
"apiVersion": "1.0.0",  
**"repliedTs": "2019-03-24T00:15:01.157-04:00",**  
"clientIp": "10.129.40.136",  
"requestDisposition": "PROCESSED",  
**"receivedTs": "2019-03-24T00:15:01.106-04:00",**  
"apiId": 210967844,  
"applicationName": "Quotient-CRMInterface",  
"user\_agent": {  
"patch": "131",  
"major": "8",  
"minor": "0",  
"os": "Other",  
"name": "Java",  
"os\_name": "Other",  
"device": "Spider"  
},  
"statusCode": 500  
}

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [March 26, 2019, 7:16pm UTC](https://discuss.elastic.co/t/need-to-create-latency-graph-in-timelion/173753/4 "2019-03-26T19:16:16Z")

</div>

@lukeelmers can we please get some help here?

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![Dheerajbtu](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@Dheerajbtu](https://discuss.elastic.co/u/Dheerajbtu)\
**Post date:** [March 27, 2019, 6:29am UTC](https://discuss.elastic.co/t/need-to-create-latency-graph-in-timelion/173753/5 "2019-03-27T06:29:51Z")

</div>

thanks @bhavyarm for taking it forward.

Adding some more information to it in simple words.

I need to plot a graph where we have a receivedTs and how many documents were replied under 1 second (which is repliedTs).

Thanks & Regards,  
Dheeraj B

---

<div class="post-metadata">

**Author:** ![Dheerajbtu](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@Dheerajbtu](https://discuss.elastic.co/u/Dheerajbtu)\
**Post date:** [March 28, 2019, 11:50am UTC](https://discuss.elastic.co/t/need-to-create-latency-graph-in-timelion/173753/6 "2019-03-28T11:50:41Z")

</div>

Hi @lukeelmers,

Can we make such query in timelion..?

Thanks & Regards,  
Dheeraj B

---

<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 25, 2019, 11:50am UTC](https://discuss.elastic.co/t/need-to-create-latency-graph-in-timelion/173753/7 "2019-04-25T11:50:55Z")

</div>

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