# Max bucket aggregation (on @timestamp /s)

**URL:** <https://discuss.elastic.co/t/max-bucket-aggregation-on-timestamp-s/213684>\
**Category:** Kibana\
**Created:** [January 3, 2020, 9:36am UTC](https://discuss.elastic.co/t/max-bucket-aggregation-on-timestamp-s/213684 "2020-01-03T09:36:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Petr.Simik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/petr.simik/32/38082_2.png) [@Petr.Simik](https://discuss.elastic.co/u/Petr.Simik)\
**Post date:** [January 3, 2020, 9:36am UTC](https://discuss.elastic.co/t/max-bucket-aggregation-on-timestamp-s/213684/1 "2020-01-03T09:36:38Z")

</div>

what is the correct approach to draw count of events (showing maximum events/seconds)

I am trying to create visualisation (see picture below)  
show graf with maximum events/seconds  
Kibana is automatically scale @timestamp interval from 1sec to 1minute, i have to zoom in to see correct values. But zoomed in graph is not what I want .

I was trying to use max bucket aggregation but it seems does not fit my case. (see picture below)

histogram over few days

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/f/4fcf6afb8b86f2f1aacedaa5a263b3f4bf0fd3c5.png)

---

<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:** [January 3, 2020, 11:56pm UTC](https://discuss.elastic.co/t/max-bucket-aggregation-on-timestamp-s/213684/2 "2020-01-03T23:56:06Z")

</div>

Hello,

So your max events of "which field" on y-axis(metric aggregation) can be mapped over data histogram in x-axis.

I can't see what value you are using for x-axis buckets.

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![Petr.Simik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/petr.simik/32/38082_2.png) [@Petr.Simik](https://discuss.elastic.co/u/Petr.Simik)\
**Post date:** [January 19, 2020, 7:27pm UTC](https://discuss.elastic.co/t/max-bucket-aggregation-on-timestamp-s/213684/3 "2020-01-19T19:27:29Z")

</div>

Thank you,  
What would be the right approach to create a visualization having  
max counts in seconds over large period of time.  
Doing it as you wrote Kibana always autoscale the time buckets and I do not have counts per seconds but count per minute or hour.

---

<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:** [February 16, 2020, 7:27pm UTC](https://discuss.elastic.co/t/max-bucket-aggregation-on-timestamp-s/213684/4 "2020-02-16T19:27:40Z")

</div>

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