# Alerting/Watcher: Unique action for every hit

**URL:** <https://discuss.elastic.co/t/alerting-watcher-unique-action-for-every-hit/71335>\
**Category:** Elasticsearch\
**Created:** [January 12, 2017, 8:24am UTC](https://discuss.elastic.co/t/alerting-watcher-unique-action-for-every-hit/71335 "2017-01-12T08:24:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nick.e](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@nick.e](https://discuss.elastic.co/u/nick.e)\
**Post date:** [January 12, 2017, 8:24am UTC](https://discuss.elastic.co/t/alerting-watcher-unique-action-for-every-hit/71335/1 "2017-01-12T08:24:33Z")

</div>

Is it possible to define **one watch** sending exactly **one email for every hit**?

So, if there were two hits in the given interval this one watch sends two emails?  
  
  
I know it's possible to send these hits to logstash and then send unique emails for each hit, but I would prefer to make it possible only with watcher to keep the configuration simple.

---

<div class="post-metadata">

**Author:** ![nick.e](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@nick.e](https://discuss.elastic.co/u/nick.e)\
**Post date:** [January 16, 2017, 9:43am UTC](https://discuss.elastic.co/t/alerting-watcher-unique-action-for-every-hit/71335/2 "2017-01-16T09:43:07Z")

</div>

As there are no answers yet, I bet it is not possible at the moment?

So I'll have to choose the way with logstash.

---

<div class="post-metadata">

**Author:** ![tanguy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanguy/32/6030_2.png) [@tanguy](https://discuss.elastic.co/u/tanguy)\
**Post date:** [January 16, 2017, 10:48am UTC](https://discuss.elastic.co/t/alerting-watcher-unique-action-for-every-hit/71335/3 "2017-01-16T10:48:20Z")

</div>

Hi,

What's the maximum number of hits you could potentially have? If it's reasonable, like 5, you could defined 1 email action for every hit. Otherwise, if you need to send something like hundreds of emails that won't scale at all...

I'm not sure either how you want "to send these hits to logstash"?

---

<div class="post-metadata">

**Author:** ![nick.e](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@nick.e](https://discuss.elastic.co/u/nick.e)\
**Post date:** [January 16, 2017, 12:03pm UTC](https://discuss.elastic.co/t/alerting-watcher-unique-action-for-every-hit/71335/4 "2017-01-16T12:03:04Z")

</div>

Mostly there aren't more than one hit, but in some cases there are two to three hits.

> [@tanguy](#):
>
> you could defined 1 email action for every hit

And how? Didn't find out how to iterate through the hits to perform the actions.

---

<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:** [February 13, 2017, 12:03pm UTC](https://discuss.elastic.co/t/alerting-watcher-unique-action-for-every-hit/71335/5 "2017-02-13T12:03:19Z")

</div>

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