# Use TimeStamp return by Logstash in DateRange Aggregate Bucket Metric

**URL:** https://discuss.elastic.co/t/use-timestamp-return-by-logstash-in-daterange-aggregate-bucket-metric/103646
**Category:** Kibana
**Created:** [October 12, 2017, 5:47am UTC](https://discuss.elastic.co/t/use-timestamp-return-by-logstash-in-daterange-aggregate-bucket-metric/103646 "2017-10-12T05:47:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ajinkya\_Sabale](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@Ajinkya\_Sabale](https://discuss.elastic.co/u/Ajinkya_Sabale)
#### Post date: [October 12, 2017, 5:47am UTC](https://discuss.elastic.co/t/use-timestamp-return-by-logstash-in-daterange-aggregate-bucket-metric/103646/1 "2017-10-12T05:47:31Z")

</div>

How to use TimeStamp return by Logstash in DateRange Aggregate Bucket Metric? I want to compare logstash results on different timestamps.

---

<div class="post-metadata">

### Author: ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)
#### Post date: [October 12, 2017, 7:59am UTC](https://discuss.elastic.co/t/use-timestamp-return-by-logstash-in-daterange-aggregate-bucket-metric/103646/2 "2017-10-12T07:59:25Z")

</div>

Hi Ajinkya,

you could just be able to create a "DateRane" aggregation in any graphs and select the `@timestamp` field from logstash there to get one bucket per time slot. Are there any specific problems you are encountering trying to aggregate on the field?

Cheers,  
Tim

---

<div class="post-metadata">

### Author: ![Ajinkya\_Sabale](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@Ajinkya\_Sabale](https://discuss.elastic.co/u/Ajinkya_Sabale)
#### Post date: [October 12, 2017, 9:43am UTC](https://discuss.elastic.co/t/use-timestamp-return-by-logstash-in-daterange-aggregate-bucket-metric/103646/3 "2017-10-12T09:43:52Z")

</div>

Thanks for quick response. I understood your point and implemented my query in a different way.

Actually I was trying to compare results of two build definition outputs. That's why I was thinking to differentiate on time stamp basis but now I'm able to save those build numbers in logstash input file and able to read those from result of logstash. I've applied filters in average bucket on the BuildNumber:"1234" field. Hence my problem is resolved now.

---

<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: [November 9, 2017, 9:43am UTC](https://discuss.elastic.co/t/use-timestamp-return-by-logstash-in-daterange-aggregate-bucket-metric/103646/4 "2017-11-09T09:43:57Z")

</div>

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