# Different alerts for different hosts

**URL:** <https://discuss.elastic.co/t/different-alerts-for-different-hosts/146869>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [August 31, 2018, 1:34pm UTC](https://discuss.elastic.co/t/different-alerts-for-different-hosts/146869 "2018-08-31T13:34:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![annk](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@annk](https://discuss.elastic.co/u/annk)\
**Post date:** [August 31, 2018, 1:34pm UTC](https://discuss.elastic.co/t/different-alerts-for-different-hosts/146869/1 "2018-08-31T13:34:46Z")

</div>

Hi,

I am using watcher to raise alerts to an alerting system. I am wondering if it is possible to have the Action block execute multiple times ? I want to be able to generate the individual alerts (webhook action) for the each unique hostnames found in payload.hits.hits.\_source,hostname.

I found similar tickets raised in 2015 ,

> [@Webhook action per document (found by watcher) instead per watcher](https://discuss.elastic.co/t/webhook-action-per-document-found-by-watcher-instead-per-watcher/35079):
>
> Hey guys, I want to generate the individual JIRA tickets (webhook action) for the each document found by watcher condition. Currently I know how to generate a JIRA ticket once the watcher condition is matched but It generates the single JIRA ticket for all the matched document(In my case : document containing the JAVA exceptions). Where as I am searching for a way to generate separate JIRA tickets for each documents found by watcher condition. Thank you.

> [@Can you Trigger Watch action for each unique result returned](https://discuss.elastic.co/t/can-you-trigger-watch-action-for-each-unique-result-returned/25539):
>
> Hi, I am wondering if it is possible to have the trigger block execute multiple times. In my example below I would like to have the webhook trigger execute for each unique hostname returned from my query results (all failed logons). The example was first designed to just grab the hostname of the first record returned from my query. I have no clue how I would go about changing my watch to accomplish what I'd like to do. I'd be greatly appreciated any help/suggestions! curl -XPUT 'http://localho…

Is it possible using the new version ?

---

<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:** [August 31, 2018, 2:40pm UTC](https://discuss.elastic.co/t/different-alerts-for-different-hosts/146869/2 "2018-08-31T14:40:10Z")

</div>

Hey,

this still holds true. Also the provided workarounds and in the referenced threads are still valid.

--Alex

---

<div class="post-metadata">

**Author:** ![annk](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@annk](https://discuss.elastic.co/u/annk)\
**Post date:** [August 31, 2018, 2:43pm UTC](https://discuss.elastic.co/t/different-alerts-for-different-hosts/146869/3 "2018-08-31T14:43:39Z")

</div>

Any chance for this feature in future versions ?

---

<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:** [September 28, 2018, 2:43pm UTC](https://discuss.elastic.co/t/different-alerts-for-different-hosts/146869/4 "2018-09-28T14:43:47Z")

</div>

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