# Issue when calculating MAX TPS using MAX Bucket Aggregation

**URL:** <https://discuss.elastic.co/t/issue-when-calculating-max-tps-using-max-bucket-aggregation/242979>\
**Category:** Kibana\
**Created:** [July 28, 2020, 9:54pm UTC](https://discuss.elastic.co/t/issue-when-calculating-max-tps-using-max-bucket-aggregation/242979 "2020-07-28T21:54:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpotnuru](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@rpotnuru](https://discuss.elastic.co/u/rpotnuru)\
**Post date:** [July 28, 2020, 9:54pm UTC](https://discuss.elastic.co/t/issue-when-calculating-max-tps-using-max-bucket-aggregation/242979/1 "2020-07-28T21:54:25Z")

</div>

Hello,  
I am trying to add a visualization to calculate MAX TPS for an API, attached the Visualization settings.

 ![Screen Shot 2020-07-28 at 2.45.14 PM](https://us1.discourse-cdn.com/elastic/original/3X/2/b/2b4d20843bbd125f15ad79b6f1708d0cf2048929.png)

I am selecting the minimum interval in my date histogram as 1s, but the metric result I am getting is for 10m interval instead of 1s, could you please help us with the issue.

I am able to calculate AVG TPS using Avg\_Bucket Metric type, but Max\_bucket is not working as expected, am I missing anything here? Appreciate any help in this regard.

Kibana Version : 7.6.1  
Elasticsearch Version: 7.6.1

I am expecting a value approximately 70, but am getting 1500, which is I am expecting the max bucket size of 10m bucket interval but not 1s buckets.  
The time duration I am selecting is 1 hr, which is below my max\_buckets parameter limit set in my Elasticsearch.

Cheers, Ravi.

---

<div class="post-metadata">

**Author:** ![rpotnuru](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@rpotnuru](https://discuss.elastic.co/u/rpotnuru)\
**Post date:** [August 5, 2020, 3:53am UTC](https://discuss.elastic.co/t/issue-when-calculating-max-tps-using-max-bucket-aggregation/242979/2 "2020-08-05T03:53:15Z")

</div>

[@elastic\_team](https://discuss.elastic.co/groups/elastic_team), can some one take a look at it and help?

We want to see if this can be achieved with out increasing the bucket-size .

---

<div class="post-metadata">

**Author:** ![rpotnuru](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@rpotnuru](https://discuss.elastic.co/u/rpotnuru)\
**Post date:** [August 12, 2020, 8:01pm UTC](https://discuss.elastic.co/t/issue-when-calculating-max-tps-using-max-bucket-aggregation/242979/3 "2020-08-12T20:01:42Z")

</div>

@Nathan_Reese , might be a simple solution, can you please suggest  
My timestamp filed is just timestamp, and not @timestamp.

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [August 13, 2020, 1:03pm UTC](https://discuss.elastic.co/t/issue-when-calculating-max-tps-using-max-bucket-aggregation/242979/4 "2020-08-13T13:03:59Z")

</div>

> I am selecting the minimum interval in my date histogram as 1s, but the metric result I am getting is for 10m interval instead of 1s, could you please help us with the issue.

What is the time range? Kibana auto scales the range when too many buckets are created. You can increase the number of buckets by setting `histogram:maxBars`

Here is a screen shot from newer versions of kibana that make this more explicit in the UI

 ![Screen Shot 2020-08-13 at 7.01.51 AM](https://us1.discourse-cdn.com/elastic/original/3X/7/d/7dd268fcf4c930c79c2e1c33455ae6b9fc608cf8.png)

---

<div class="post-metadata">

**Author:** ![rpotnuru](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@rpotnuru](https://discuss.elastic.co/u/rpotnuru)\
**Post date:** [August 24, 2020, 6:45pm UTC](https://discuss.elastic.co/t/issue-when-calculating-max-tps-using-max-bucket-aggregation/242979/5 "2020-08-24T18:45:27Z")

</div>

yes the timestamp field is just timestamp.

---

<div class="post-metadata">

**Author:** ![rpotnuru](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@rpotnuru](https://discuss.elastic.co/u/rpotnuru)\
**Post date:** [August 24, 2020, 6:48pm UTC](https://discuss.elastic.co/t/issue-when-calculating-max-tps-using-max-bucket-aggregation/242979/6 "2020-08-24T18:48:56Z")

</div>

I am using smaller intervals only, like 30 mins, in such cases the bucket size should only 1800.

---

<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:** [September 21, 2020, 6:49pm UTC](https://discuss.elastic.co/t/issue-when-calculating-max-tps-using-max-bucket-aggregation/242979/7 "2020-09-21T18:49:05Z")

</div>

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