# Kibana watcher : Send message field in if log level is ERROR

**URL:** https://discuss.elastic.co/t/kibana-watcher-send-message-field-in-if-log-level-is-error/286529
**Category:** Kibana
**Tags:** elastic-stack-alerting
**Created:** [October 12, 2021, 5:28pm UTC](https://discuss.elastic.co/t/kibana-watcher-send-message-field-in-if-log-level-is-error/286529 "2021-10-12T17:28:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Chandrakant\_Naik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chandrakant_naik/32/79430_2.png) [@Chandrakant\_Naik](https://discuss.elastic.co/u/Chandrakant_Naik)
#### Post date: [October 12, 2021, 5:28pm UTC](https://discuss.elastic.co/t/kibana-watcher-send-message-field-in-if-log-level-is-error/286529/1 "2021-10-12T17:28:18Z")

</div>

i have configure watcher in kibana to notify me via email if there are ERROR in log level. for couple indices.

```auto
input": {
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"xxxx.-*"
],
"types": [],
"body": {
"size": 0,
"query": {
"match": {
"log-level.keyword": "ERROR" }}}}} 

```

Email actions code is below

```auto
"email_admin": {
"email": {
"profile": "standard",
"to": [
"chandrakant.rvce@gmail.com"
],
"subject": "Encountered {{ctx.payload.hits.total}} Infos",
"body": {
"html": "Too many log-level ERROR found in logs" }}} 

```

As part of the email i want to send the message field for the ERROR. How do i do it ?

---

<div class="post-metadata">

### Author: ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)
#### Post date: [October 25, 2021, 5:04pm UTC](https://discuss.elastic.co/t/kibana-watcher-send-message-field-in-if-log-level-is-error/286529/2 "2021-10-25T17:04:31Z")

</div>

Hello,

Please take a look at this discuss post - [Include Fields in Watcher Email Alert - #5 by MultiplierMultiplier](https://discuss.elastic.co/t/include-fields-in-watcher-email-alert/115700/5)

You need to include ctx.payload

Thanks,  
Bhavya

---

<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: [November 22, 2021, 5:05pm UTC](https://discuss.elastic.co/t/kibana-watcher-send-message-field-in-if-log-level-is-error/286529/3 "2021-11-22T17:05:04Z")

</div>

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