# How to check the count for value within 30 sec frame in logstash

**URL:** <https://discuss.elastic.co/t/how-to-check-the-count-for-value-within-30-sec-frame-in-logstash/104015>\
**Category:** Logstash\
**Created:** [October 15, 2017, 7:25am UTC](https://discuss.elastic.co/t/how-to-check-the-count-for-value-within-30-sec-frame-in-logstash/104015 "2017-10-15T07:25:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [October 15, 2017, 7:25am UTC](https://discuss.elastic.co/t/how-to-check-the-count-for-value-within-30-sec-frame-in-logstash/104015/1 "2017-10-15T07:25:42Z")

</div>

HI Team,  
I working in new scenario in that i want to count the field value in the time frame of 30 sec.

For example:  
if i have field produce action value more than 5 times in the timeframe of 30 sec i need to send the mail  
how can i perform this

anyone help me on this

im using ELK(2.2.1,2.3)

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 15, 2017, 2:01pm UTC](https://discuss.elastic.co/t/how-to-check-the-count-for-value-within-30-sec-frame-in-logstash/104015/2 "2017-10-15T14:01:49Z")

</div>

As data can be processed parallel across any of the Logstash threads, this logic is better implemented in Elasticsearch, e.g. through [X-Pack Alerting](https://www.elastic.co/guide/en/x-pack/current/xpack-alerting.html). This also has the benefit of being able to scale to more than one Logstash instance.

---

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [October 15, 2017, 2:22pm UTC](https://discuss.elastic.co/t/how-to-check-the-count-for-value-within-30-sec-frame-in-logstash/104015/3 "2017-10-15T14:22:10Z")

</div>

Im not using Xpack in my Application and how to process this in elasticsearch.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 15, 2017, 2:25pm UTC](https://discuss.elastic.co/t/how-to-check-the-count-for-value-within-30-sec-frame-in-logstash/104015/4 "2017-10-15T14:25:31Z")

</div>

Run a query periodically and check if the condition is true. If this is the case you can send the email.

---

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [October 15, 2017, 2:26pm UTC](https://discuss.elastic.co/t/how-to-check-the-count-for-value-within-30-sec-frame-in-logstash/104015/5 "2017-10-15T14:26:42Z")

</div>

Can you help me on the query part. It will be helpful for me.

---

<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 12, 2017, 2:27pm UTC](https://discuss.elastic.co/t/how-to-check-the-count-for-value-within-30-sec-frame-in-logstash/104015/6 "2017-11-12T14:27:09Z")

</div>

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