# Create a watch with multiple actions each with a different condition

**URL:** <https://discuss.elastic.co/t/create-a-watch-with-multiple-actions-each-with-a-different-condition/74646>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [February 10, 2017, 11:55am UTC](https://discuss.elastic.co/t/create-a-watch-with-multiple-actions-each-with-a-different-condition/74646 "2017-02-10T11:55:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nielsoncr](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@nielsoncr](https://discuss.elastic.co/u/nielsoncr)\
**Post date:** [February 10, 2017, 11:55am UTC](https://discuss.elastic.co/t/create-a-watch-with-multiple-actions-each-with-a-different-condition/74646/1 "2017-02-10T11:55:10Z")

</div>

Is it possible to create a watch with multiple actions where each action has a different condition that triggers for execution? The use case is service logs stored in Elasticsearch are monitored for errors and tier 1 support is to be notified by email if the number of errors per hours is above a certain threshold. However if the number of errors spikes to more than five times the threshold an email needs to go out to tier 2 support as well as management. I know this could be done in two watches but would rather not have to worry about keeping the query logic in sync between the two.

Thanks

---

<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:** [February 10, 2017, 12:26pm UTC](https://discuss.elastic.co/t/create-a-watch-with-multiple-actions-each-with-a-different-condition/74646/2 "2017-02-10T12:26:49Z")

</div>

Hey,

Since version 5.0 you can have conditions inside of each action, you see an example [here](https://www.elastic.co/guide/en/x-pack/5.2/actions.html), which uses an additional condition in the `notify_pager` action.

--Alex

---

<div class="post-metadata">

**Author:** ![nielsoncr](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@nielsoncr](https://discuss.elastic.co/u/nielsoncr)\
**Post date:** [February 10, 2017, 1:18pm UTC](https://discuss.elastic.co/t/create-a-watch-with-multiple-actions-each-with-a-different-condition/74646/3 "2017-02-10T13:18:49Z")

</div>

Thanks Alex,

I’m using version 2.1.2 but will a 5.x migration is on our roadmap

---

<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:** [March 10, 2017, 1:18pm UTC](https://discuss.elastic.co/t/create-a-watch-with-multiple-actions-each-with-a-different-condition/74646/4 "2017-03-10T13:18:59Z")

</div>

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