# Unable to configure watches

**URL:** https://discuss.elastic.co/t/unable-to-configure-watches/170402
**Category:** Kibana
**Created:** [February 28, 2019, 8:05pm UTC](https://discuss.elastic.co/t/unable-to-configure-watches/170402 "2019-02-28T20:05:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![adityak248](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@adityak248](https://discuss.elastic.co/u/adityak248)
#### Post date: [February 28, 2019, 8:05pm UTC](https://discuss.elastic.co/t/unable-to-configure-watches/170402/1 "2019-02-28T20:05:13Z")

</div>

Hello team,  
While configuring the watcher I am facing issues w.r.t email notifications.  
Trying to send an alert about node's CPU utilization and other paramenters, I am not able to get or rather set subject to send hostname and other details.  
I am talking wrt terms with ctx.xxx.yyyy  
say ctx.hostname, ctx.ip address kind of stuff.

I would like to have an alert in this format:

The is an alert triggered wrt to environment node. Attend it on priority.  
##########################################  
Alert Type: {{ctx.metadata.name}}  
Host: {{ctx.metadata.}}  
HostIP: {{ctx.payload}}  
Timestamp: {{ctx.execution\_time}}  
Possible solutions: httplinktotroubleshootdocument  
##########################################

---

<div class="post-metadata">

### Author: ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)
#### Post date: [February 28, 2019, 10:56pm UTC](https://discuss.elastic.co/t/unable-to-configure-watches/170402/2 "2019-02-28T22:56:02Z")

</div>

The email subject can contain Mustache templates just like the body of the email. So your [email action](https://www.elastic.co/guide/en/elastic-stack-overview/6.6/actions-email.html) might look like

```auto
"actions" : {
  "send_email" : { 
    "email" : { 
      "to" : "<username>@<domainname>", 
      "subject" : "High CPU Utiliziation on {{ctx.hostname}} at {{ctx.execution_time}}", 
      "body" : "..." 
    }
  }
}

```

If you are getting errors when setting up the action, please reply with the relevant errors.

---

<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 28, 2019, 10:56pm UTC](https://discuss.elastic.co/t/unable-to-configure-watches/170402/3 "2019-03-28T22:56:03Z")

</div>

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