# How to create periodic check in logstash

**URL:** <https://discuss.elastic.co/t/how-to-create-periodic-check-in-logstash/267342>\
**Category:** Logstash\
**Created:** [March 16, 2021, 9:30am UTC](https://discuss.elastic.co/t/how-to-create-periodic-check-in-logstash/267342 "2021-03-16T09:30:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anupts](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@anupts](https://discuss.elastic.co/u/anupts)\
**Post date:** [March 16, 2021, 9:30am UTC](https://discuss.elastic.co/t/how-to-create-periodic-check-in-logstash/267342/1 "2021-03-16T09:30:36Z")

</div>

Hello,

We have requirement , where we need to monitor for user activity on periodic basis.

We will have this information in our log file .

FOr example:

User has accessed some page in the application. This will be logged on logs and we want to trigger email when the same user access the same page ( more than 5 times ) within 5 mins.

How to configure this in logstash config file

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 16, 2021, 3:59pm UTC](https://discuss.elastic.co/t/how-to-create-periodic-check-in-logstash/267342/2 "2021-03-16T15:59:45Z")

</div>

This use-case is better matched to [Watcher](https://www.elastic.co/guide/en/kibana/current/watcher-ui.html) rather than logstash.

If you really need to do it in logstash then you could use a [metrics](https://www.elastic.co/guide/en/logstash/current/plugins-filters-metrics.html) filter with the meter option. If [thing][rate\_5m] gets above 0.016 then you have more than 5 events in 5 minutes. However, this could result in logstash tracking a monstrous number of metrics.

---

<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:** [April 13, 2021, 4:00pm UTC](https://discuss.elastic.co/t/how-to-create-periodic-check-in-logstash/267342/3 "2021-04-13T16:00:16Z")

</div>

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