# Need to add "Log message" in the alert from opendistro kibana

**URL:** <https://forum.opensearch.org/t/need-to-add-log-message-in-the-alert-from-opendistro-kibana/8799>\
**Category:** Open Source Elasticsearch and Kibana\
**Tags:** troubleshoot, configure\
**Created:** [March 2, 2022, 7:41pm UTC](https://forum.opensearch.org/t/need-to-add-log-message-in-the-alert-from-opendistro-kibana/8799 "2022-03-02T19:41:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaimoh](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@shaimoh](https://forum.opensearch.org/u/shaimoh)\
**Post date:** [March 2, 2022, 7:41pm UTC](https://forum.opensearch.org/t/need-to-add-log-message-in-the-alert-from-opendistro-kibana/8799/1 "2022-03-02T19:41:57Z")

</div>

Hi Team,

trying to add the log message in the alert body to be sent when triggered. Tried with the below syntax, no luck… it comes empty.

```auto
{{#ctx.results.0.hits.hits}}
> {{_source.logs.loggerName}}:
{{/ctx.results.0.hits.hits}}

```

Can someone pls advise what is missing here ? Im using the extraction query to create the alert which I took from discover(inspect)

Thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![kris](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/kris/32/2208_2.png) [@kris](https://forum.opensearch.org/u/kris)\
**Post date:** [February 7, 2023, 12:02am UTC](https://forum.opensearch.org/t/need-to-add-log-message-in-the-alert-from-opendistro-kibana/8799/2 "2023-02-07T00:02:58Z")

</div>


