# Watcher Filter

**URL:** https://discuss.elastic.co/t/watcher-filter/110695
**Category:** Elasticsearch
**Created:** [December 7, 2017, 2:54pm UTC](https://discuss.elastic.co/t/watcher-filter/110695 "2017-12-07T14:54:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Samau4ka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samau4ka/32/25281_2.png) [@Samau4ka](https://discuss.elastic.co/u/Samau4ka)
#### Post date: [December 7, 2017, 2:54pm UTC](https://discuss.elastic.co/t/watcher-filter/110695/1 "2017-12-07T14:54:03Z")

</div>

Hi everyone, is there somewhere A filter function for the Watcher Agent in X-pack. I wont him to count all faild logins so he can send me a email if its count over 10 trys in 15min.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [December 8, 2017, 9:43am UTC](https://discuss.elastic.co/t/watcher-filter/110695/2 "2017-12-08T09:43:05Z")

</div>

Hey,

this is exactly what watcher is for, but you need to write the alert by yourself, as we dont know how your data looks like, you need to write your own query. So you need to come up with a query, that searches for failed logins in the last 15 minutes, and check if the count of that query response is greater than 15.

You should check out the [getting started guide](https://www.elastic.co/guide/en/x-pack/6.0/watcher-getting-started.html) and in order to speed up writing your watches, this article might help

> **[Watching the watches: Writing, debugging and testing watches
	  	 | Elastic](https://www.elastic.co/blog/watching-the-watches-writing-debugging-and-testing-watches)**
>
> TLDR; This blog post will outline how to efficiently write, execute, and debug watches. This will be useful if you are writing your own watches or if you have to debug watches written by your colleagu...

--Alex

---

<div class="post-metadata">

### Author: ![Samau4ka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samau4ka/32/25281_2.png) [@Samau4ka](https://discuss.elastic.co/u/Samau4ka)
#### Post date: [December 8, 2017, 10:16am UTC](https://discuss.elastic.co/t/watcher-filter/110695/3 "2017-12-08T10:16:54Z")

</div>

thanks you for the info i will try that. 😁

---

<div class="post-metadata">

### Author: ![Samau4ka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samau4ka/32/25281_2.png) [@Samau4ka](https://discuss.elastic.co/u/Samau4ka)
#### Post date: [December 8, 2017, 1:36pm UTC](https://discuss.elastic.co/t/watcher-filter/110695/4 "2017-12-08T13:36:11Z")

</div>

it worked for me but ther still a problem my interval is 60s so the watcher will sends me 15 emails over 15 min if he observed real atack is ther an option to send the email only one time

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [December 11, 2017, 8:47am UTC](https://discuss.elastic.co/t/watcher-filter/110695/5 "2017-12-11T08:47:59Z")

</div>

you might want to check out throttling in watcher, see

[https://www.elastic.co/guide/en/x-pack/6.0/how-watcher-works.html#watch-acknowledgment-throttling](https://www.elastic.co/guide/en/x-pack/6.0/how-watcher-works.html#watch-acknowledgment-throttling)

---

<div class="post-metadata">

### Author: ![Samau4ka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samau4ka/32/25281_2.png) [@Samau4ka](https://discuss.elastic.co/u/Samau4ka)
#### Post date: [December 11, 2017, 1:10pm UTC](https://discuss.elastic.co/t/watcher-filter/110695/6 "2017-12-11T13:10:41Z")

</div>

thank you a lot that was the solution 😁 i was searching for "cool down time" wasnt "throttling" on my mind

---

<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: [January 8, 2018, 1:11pm UTC](https://discuss.elastic.co/t/watcher-filter/110695/7 "2018-01-08T13:11:28Z")

</div>

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