# How to add hostname value in email subject or body

**URL:** https://discuss.elastic.co/t/how-to-add-hostname-value-in-email-subject-or-body/268820
**Category:** Kibana
**Tags:** elastic-stack-alerting
**Created:** [March 30, 2021, 4:26pm UTC](https://discuss.elastic.co/t/how-to-add-hostname-value-in-email-subject-or-body/268820 "2021-03-30T16:26:55Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)
#### Post date: [March 30, 2021, 10:21pm UTC](https://discuss.elastic.co/t/how-to-add-hostname-value-in-email-subject-or-body/268820/2 "2021-03-30T22:21:40Z")

</div>

A few discussions + examples:

> [@Include Fields in Watcher Email Alert](https://discuss.elastic.co/t/include-fields-in-watcher-email-alert/115700/18):
>
> Hi @spinscale, I have had chance to get look into advanced watches again. I am now getting values returned after looking at your advice. "hits": { "hits": [{ "\_index": "main", "\_type": "doc", "\_source": { "process\_id": 620, "computer\_name": "TEST", "keywords": ["Audit Failure"], "log\_name": "Security", "level": "I…

> [@Watcher - How to reference an index field value in an email body](https://discuss.elastic.co/t/watcher-how-to-reference-an-index-field-value-in-an-email-body/205063):
>
> I would like to trigger a watcher alert using Kibana Watcher UI. The condition works fine but I would like to give additional information in the email body. In my case the watcher will triggered when a transaction duration of 20 seconds has been exceeded. I tried as follows in the body section but it won't work: The following transaction took over 20sec: [{{#ctx.payload.\_value}}{{url.path}}] Could somebody give me a hint how to insert values (in my case: /rest/analytics/receive) …

---

_[View the full topic](https://discuss.elastic.co/t/how-to-add-hostname-value-in-email-subject-or-body/268820)._
