# Get average of response time in specific interval

**URL:** https://discuss.elastic.co/t/get-average-of-response-time-in-specific-interval/50828
**Category:** Kibana
**Created:** [May 24, 2016, 11:14am UTC](https://discuss.elastic.co/t/get-average-of-response-time-in-specific-interval/50828 "2016-05-24T11:14:54Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ivanandrianto95](https://avatars.discourse-cdn.com/v4/letter/i/48db29/32.png) [@ivanandrianto95](https://discuss.elastic.co/u/ivanandrianto95)
#### Post date: [May 24, 2016, 11:14am UTC](https://discuss.elastic.co/t/get-average-of-response-time-in-specific-interval/50828/1 "2016-05-24T11:14:54Z")

</div>

I use Filebeat and ELK and I need to display average of response time in specific interval. It has a field response\_time but I don't know how to get the average response time each minute. How can I do it?

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [May 24, 2016, 9:28pm UTC](https://discuss.elastic.co/t/get-average-of-response-time-in-specific-interval/50828/2 "2016-05-24T21:28:08Z")

</div>

You can do a date histogram over an aggregation of the average response time, and set the interval of the histogram to the "Minute" option.

Here's a data table visualization I did (over a "bytes" field since my data doesn't have response time):

 ![](https://us1.discourse-cdn.com/elastic/original/2X/6/673ec26aa53f6e4c7e154d34d4e1f5c23a539df4.png)

---

<div class="post-metadata">

### Author: ![ivanandrianto95](https://avatars.discourse-cdn.com/v4/letter/i/48db29/32.png) [@ivanandrianto95](https://discuss.elastic.co/u/ivanandrianto95)
#### Post date: [May 25, 2016, 2:13am UTC](https://discuss.elastic.co/t/get-average-of-response-time-in-specific-interval/50828/3 "2016-05-25T02:13:05Z")

</div>

I don't see response\_time in dropdown when I choose average in aggregation

---

<div class="post-metadata">

### Author: ![ivanandrianto95](https://avatars.discourse-cdn.com/v4/letter/i/48db29/32.png) [@ivanandrianto95](https://discuss.elastic.co/u/ivanandrianto95)
#### Post date: [May 25, 2016, 8:55am UTC](https://discuss.elastic.co/t/get-average-of-response-time-in-specific-interval/50828/5 "2016-05-25T08:55:40Z")

</div>

The problem is in Kibana, the type of response\_time is string even I've converted it to float in logstash.conf

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [May 25, 2016, 4:26pm UTC](https://discuss.elastic.co/t/get-average-of-response-time-in-specific-interval/50828/6 "2016-05-25T16:26:13Z")

</div>

The mappings are held in Elasticsearch, Kibana uses those mappings to control what it's able to do with the fields.

Check the mapping for your index by running `curl -XGET "http://hostname:port/logstash-*/_mapping`. If the field is not mapped as a float here, something is going wrong with your logstash.conf.

If your using a `mutate` filter to do the conversion, [this reference](https://discuss.elastic.co/t/convert-string-to-float-failed/32232/3) could be of help.

---

<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: [July 6, 2017, 1:52pm UTC](https://discuss.elastic.co/t/get-average-of-response-time-in-specific-interval/50828/7 "2017-07-06T13:52:18Z")

</div>


