# Alert and connector email context format

**URL:** <https://discuss.elastic.co/t/alert-and-connector-email-context-format/260927>\
**Category:** Kibana\
**Created:** [January 13, 2021, 4:02am UTC](https://discuss.elastic.co/t/alert-and-connector-email-context-format/260927 "2021-01-13T04:02:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lusynda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lusynda/32/53557_2.png) [@lusynda](https://discuss.elastic.co/u/lusynda)\
**Post date:** [January 13, 2021, 4:02am UTC](https://discuss.elastic.co/t/alert-and-connector-email-context-format/260927/1 "2021-01-13T04:02:24Z")

</div>

Hi all  
I want to format to output some information regarding the detection in SIEM.  
For example i want to output the source.ip when some query that i have for dns log.  
To be more precise, i have an detection rule that query for any dns query, if hit i want to see the source.ip field in the email so that i dont really have to access siem app just to view it.  
Can anyone help me.  
Thanks for your time.

---

<div class="post-metadata">

**Author:** ![spong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spong/32/54343_2.png) [@spong](https://discuss.elastic.co/u/spong)\
**Post date:** [January 13, 2021, 5:47pm UTC](https://discuss.elastic.co/t/alert-and-connector-email-context-format/260927/2 "2021-01-13T17:47:51Z")

</div>

Hey there @lusynda! 👋

This functionality will be available in the upcoming `7.11` release and was added as part of this [PR](https://github.com/elastic/kibana/pull/85488). So for example, you'll be able to print out the `source.ip` for each matching alert by using something like the following within your email alert payload:

```auto
{{#context.alerts}}Source IP of alert: {{source.ip}}{{/context.alerts}}

```

Hope this helps! 🙂

Cheers!  
Garrett

---

<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:** [February 10, 2021, 5:47pm UTC](https://discuss.elastic.co/t/alert-and-connector-email-context-format/260927/3 "2021-02-10T17:47:52Z")

</div>

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