# How many actions can one watch have?

**URL:** <https://discuss.elastic.co/t/how-many-actions-can-one-watch-have/34334>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [November 11, 2015, 2:45pm UTC](https://discuss.elastic.co/t/how-many-actions-can-one-watch-have/34334 "2015-11-11T14:45:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SuperPringles](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/superpringles/32/5303_2.png) [@SuperPringles](https://discuss.elastic.co/u/SuperPringles)\
**Post date:** [November 11, 2015, 2:45pm UTC](https://discuss.elastic.co/t/how-many-actions-can-one-watch-have/34334/1 "2015-11-11T14:45:44Z")

</div>

Let's say for example that I want to create a watch that watches my system's memory use. If it has only 5% memory left I want to know about this.

Now for this watch I plan on adding an action which sends me a message via Slack or PagerDuty but I want a second action to create a ticket with relevant information into Jira. Is it possible to put this into one watch or do I have to make a "memory\_use\_watch\_pagerduty" and a second one called "memory\_use\_watch\_jira" while they just check the same thing?

Thanks 😄!

---

<div class="post-metadata">

**Author:** ![ESamir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/esamir/32/77283_2.png) [@ESamir](https://discuss.elastic.co/u/ESamir)\
**Post date:** [November 11, 2015, 3:11pm UTC](https://discuss.elastic.co/t/how-many-actions-can-one-watch-have/34334/2 "2015-11-11T15:11:34Z")

</div>

You can have multiple actions in the same watches

```auto
{
 "actions" : {
    "email_administrator" : {
      "email" : {
        "to" : "sys.admino@host.domain",
        "subject" : "Encountered {{ctx.payload.hits.total}} errors",
        "body" : "Too many error in the system, see attached data",
        "attach_data" : true,
        "priority" : "high"
      }
    },
    "notify_pager" : {
      "webhook" : {
        "method" : "POST",
        "host" : "pager.service.domain",
        "port" : 1234,
        "path" : "/{{watch_id}}",
        "body" : "Encountered {{ctx.payload.hits.total}} errors"
      }
    }
  }

```

---

<div class="post-metadata">

**Author:** ![SuperPringles](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/superpringles/32/5303_2.png) [@SuperPringles](https://discuss.elastic.co/u/SuperPringles)\
**Post date:** [November 11, 2015, 3:14pm UTC](https://discuss.elastic.co/t/how-many-actions-can-one-watch-have/34334/3 "2015-11-11T15:14:14Z")

</div>

@ESamir and they won't interfere with each other?

Also does the order you put the actions in matter? Going by your example will the email\_administrator go before the notify\_pager?

---

<div class="post-metadata">

**Author:** ![ESamir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/esamir/32/77283_2.png) [@ESamir](https://discuss.elastic.co/u/ESamir)\
**Post date:** [November 11, 2015, 3:21pm UTC](https://discuss.elastic.co/t/how-many-actions-can-one-watch-have/34334/4 "2015-11-11T15:21:00Z")

</div>

The actions are executed one at a time, Each action are executed independently from the others.

---

<div class="post-metadata">

**Author:** ![SuperPringles](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/superpringles/32/5303_2.png) [@SuperPringles](https://discuss.elastic.co/u/SuperPringles)\
**Post date:** [November 11, 2015, 3:21pm UTC](https://discuss.elastic.co/t/how-many-actions-can-one-watch-have/34334/5 "2015-11-11T15:21:42Z")

</div>

I see! Thank you very much for clarifying 😄

---

<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:** [July 6, 2017, 1:48pm UTC](https://discuss.elastic.co/t/how-many-actions-can-one-watch-have/34334/6 "2017-07-06T13:48:14Z")

</div>


