# How to fetch record count between two date range using logstash filter

**URL:** <https://discuss.elastic.co/t/how-to-fetch-record-count-between-two-date-range-using-logstash-filter/168953>\
**Category:** Logstash\
**Created:** [February 19, 2019, 7:29am UTC](https://discuss.elastic.co/t/how-to-fetch-record-count-between-two-date-range-using-logstash-filter/168953 "2019-02-19T07:29:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dan](https://discuss.elastic.co/u/Dan)\
**Post date:** [February 19, 2019, 7:29am UTC](https://discuss.elastic.co/t/how-to-fetch-record-count-between-two-date-range-using-logstash-filter/168953/1 "2019-02-19T07:29:05Z")

</div>

I am using elastic search as my input  
in my input, I am reading one index and my output is email

I want to send a mail on a daily basis record count between two @timestamp  
from time 00:00 to 24:00

I tried ruby filter but I am not succeed

How can I achieve this through logstash filter..

---

<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:** [March 19, 2019, 7:29am UTC](https://discuss.elastic.co/t/how-to-fetch-record-count-between-two-date-range-using-logstash-filter/168953/2 "2019-03-19T07:29:07Z")

</div>

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