# Strange behavior with bucket/pipeline aggregations

**URL:** <https://discuss.elastic.co/t/strange-behavior-with-bucket-pipeline-aggregations/197386>\
**Category:** Elasticsearch\
**Created:** [August 29, 2019, 5:26pm UTC](https://discuss.elastic.co/t/strange-behavior-with-bucket-pipeline-aggregations/197386 "2019-08-29T17:26:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvenkat\_in](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mvenkat\_in](https://discuss.elastic.co/u/mvenkat_in)\
**Post date:** [August 29, 2019, 5:26pm UTC](https://discuss.elastic.co/t/strange-behavior-with-bucket-pipeline-aggregations/197386/1 "2019-08-29T17:26:56Z")

</div>

Hi  
I have logs index with events logged every sec. The date filed is request\_dtm.  
I am trying to build the data visualization to plot in below format to have 24 rows per a day.  
"Transaction Hour - Total Requests - Min TPS - Max TPS"

The Min TPS = The minimum TPS processed at any second in that particular hour.  
The Max TPS = The maximum TPS processed at any second in that particular hour.  
Total Requests = The total number of requests processed in that particular hour.

I have used the bucket aggregations with metrics  
Metric 1 - Aggregation:Sum Bucket - Bucket:Date Histogram on request\_dtm with interval as Second - Metric: Count  
Metric 2 - Aggregation:Min Bucket - Bucket:Date Histogram on request\_dtm with interval as Second - Metric: Count  
Metric 3 - Aggregation:Max Bucket - Bucket:Date Histogram on request\_dtm with interval as Second - Metric: Count

Split Rows: Aggregation: Date Histogram on request\_dtm with internal as Hour

Problem Statement:  
The output is bit inconsistent as the min, max TPS aggregation values are resulting inconstantly based on the time duration selected in Kibana.  
For example:  
1- See the first image with the time duration as for shorter hours. The min, max TPS values seem OK.

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

2- See the second image with the time duration increased. The min, max TPS values are changed and not same as resulted in Image 1.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/c/8c0fee40baaa7b8985fb6ff0df162b71e843f48b.png)

I am bit confused on this inconsistent behavior. Can anyone please point at where I am probably making a mistake to meet my mentioned requirement.

Thanks

---

<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 26, 2019, 5:26pm UTC](https://discuss.elastic.co/t/strange-behavior-with-bucket-pipeline-aggregations/197386/2 "2019-09-26T17:26:59Z")

</div>

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