# How to display a parameter that is appearing in the logs in an email?

**URL:** <https://discuss.elastic.co/t/how-to-display-a-parameter-that-is-appearing-in-the-logs-in-an-email/101929>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [September 27, 2017, 6:10am UTC](https://discuss.elastic.co/t/how-to-display-a-parameter-that-is-appearing-in-the-logs-in-an-email/101929 "2017-09-27T06:10:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Indiresh](https://avatars.discourse-cdn.com/v4/letter/i/e36b37/32.png) [@Indiresh](https://discuss.elastic.co/u/Indiresh)\
**Post date:** [September 27, 2017, 6:10am UTC](https://discuss.elastic.co/t/how-to-display-a-parameter-that-is-appearing-in-the-logs-in-an-email/101929/1 "2017-09-27T06:10:00Z")

</div>

Hi there,

I am currently working with Watcher on Kibana. Is there any way to access and display a parameter that's appearing in my server logs? For ex: In the logs, one of the parameters is "Hostname". I'd like to display this in the email. How do I do that in the script?

---

<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:** [October 2, 2017, 12:55pm UTC](https://discuss.elastic.co/t/how-to-display-a-parameter-that-is-appearing-in-the-logs-in-an-email/101929/2 "2017-10-02T12:55:53Z")

</div>

It would help tremendously if you shared your watch. You can display anything that is part of the input in the email, you can use the mustache notation to access values like `ctx.payload.hits.hits.0._source.some_value` to access the field of the first search result.

---

<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:** [October 30, 2017, 12:56pm UTC](https://discuss.elastic.co/t/how-to-display-a-parameter-that-is-appearing-in-the-logs-in-an-email/101929/3 "2017-10-30T12:56:05Z")

</div>

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