# Filter scripts for same time interval

**URL:** <https://discuss.elastic.co/t/filter-scripts-for-same-time-interval/203798>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [October 16, 2019, 9:31am UTC](https://discuss.elastic.co/t/filter-scripts-for-same-time-interval/203798 "2019-10-16T09:31:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Masixole](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/masixole/32/55992_2.png) [@Masixole](https://discuss.elastic.co/u/Masixole)\
**Post date:** [October 16, 2019, 9:31am UTC](https://discuss.elastic.co/t/filter-scripts-for-same-time-interval/203798/1 "2019-10-16T09:31:41Z")

</div>

Hi,

I'm new in elastic search, my question is I need filter my logs for successful brute force attacks. The criteria that i'm using: I want logs that have the same time intervals (Mirror Time), Have more than three authentication failure, and have logged in successfully after the 3rd authentication failure.

What I need help with is a filter script query that cane give those logs, if i am using a wrong criteria please correct me.

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [October 17, 2019, 8:42pm UTC](https://discuss.elastic.co/t/filter-scripts-for-same-time-interval/203798/2 "2019-10-17T20:42:38Z")

</div>

Maybe you could give an example of one of the documents in Elasticsearch so we can help with this question.

---

<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 14, 2019, 8:42pm UTC](https://discuss.elastic.co/t/filter-scripts-for-same-time-interval/203798/3 "2019-11-14T20:42:44Z")

</div>

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